Zoho: Deluge: What techniques are used to debug Zoho Deluge syntax errors? [closed] - syntax-error

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
This post was edited and submitted for review last year and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Zoho: Deluge: What techniques are used to debug Zoho Deluge syntax errors?
Often the online Zoho Deluge code provides minimal information regarding syntax errors. What techniques are successful to quickly identify the code with the incorrect syntax?
Earlier version of the question
Zoho: Deluge: syntax checking for Zoho Deluge code in an offline editor (vim, emacs, vscode...)?
Does anyone have suggested techniques for syntax checking Zoho Deluge code when editing the code offline from Zoho?
Background:
I often write/modify deluge code in offline editors like vim, emacs and nano because I'm used to their keyboard options and their ability to 'diff' different versions of the code. Then I paste the code back into the Zoho Deluge editor which sometimes reports some syntax error that I missed when working in the offline editor.
Some Practical Deluge Debugging Steps
Over time, I developed these notes for debugging Zoho-Deluge code. Posting them here in case it helps anyone who runs across this question.
The Zoho Deluge Editor's syntax error messages are often general in nature. The most common one is:
"Improper Statement. Error might be due to missing ';' at the end of line or incomplete expression"
The full list of error messages is here.
https://www.zoho.com/deluge/help/error-messages.html
This is a good reference for when one runs across an unfamiliar error message.
Techniques for debugging Zoho Deluge syntax errors.
Check for missing end of line semi-colons.
Check for missing '+' signs or double-quotes in recently added string construction.
Example: mystr = "this" "that" + "other";
Example: mystr = "this" + "that + "other";
Check for a recently added function call where the data type is included before the variable:
Example MyFunction(string Param); should be MyFunction(Param); when calling it.
Check if recently added ',' (comma) was typed in as '.' (dot).
Check for Missing paren at the end of an 'if' clause that includes multiple parens.
Example: if(response.get("responseCode")
Check that 'info' isn't missing at the beginning of a debug/display statement:
Examples
bad: myvar;
good: info myvar;
Check there there isn't a semi-colon at the end of a 'for each' loop statement but before the curly brackets
Examples
bad: (has comma at the end of the 'for each' line
for each field in fields;
{
...
}
good
for each field in fields
{
...
}
Check that there isn't a trailing comma in a list definition.
Examples
bad: mylist = {"this", "that",};
good: mylist = {"this", "that");

Visual Studio Code has one if you search extensions for deluge.

Related

Variable does not exist but compile works, runtime fails [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have inherited a bunch of Access projects. I found a very strange issue where some form code accesses a variable that does not exist. The compile works fine, intellisense will auto complete the variable but at runtime I get an error 2465, can't find the field 'xxx' referred to in your expression.
The field most certainly does not exist, there is no variable by that name.
Any ideas why the compiler is not finding the issue?
I think it may have something to do with the query to fill the form. I think it did have the column XXX at some point, then it was removed. The compile still works but the run does not. I'm not sure.
There is no code with this question because the code is not at fault. If you read the accepted answer below its a 'feature' of Access that the VBA compiler uses the auto generated column names from a record source as variable names, modifying the query breaks this linkage.
You don't mention if the var comes up with you type me + "dot" in the given form.
This would reveal important information.
You can also type in the variable name (it it is not a me.dot var) and then hit shift f2, and that should/can jump you to the location of the variable.
However, if this is a me.dot value? then open the form in design mode. Display property sheet, data tab.
Now select and CUT out the forms datasource to your paste buffer. You now must TAB out of the datasource. Now, tab back in, re-paste in the forms datasource, and AGAIN tab out. This forces access to re-generate the "me." members for the form. So, over time it is possible to delete columns and controls on that form, but the "members" are thus no re-generated until such time you do above.
so, the missing detail here is this a me.dot intel-sense, or is this some global var defined in some code module? As noted, if this is a not a me.dot member of a form, then click on that var, and try shift-f2 and see if that finds the variable.
Of course in the vba editor, you can also do a ctrl-f and search the GLOBAL application for all and any occurrences of that variable - and thus such a search of all code would and could again find the origin of that variable.

Encountered Strange Error: " & ErrorName

New to VisualStudio 2015, but not to programming. Have searched both Google and here for a lead on this, but considering the available search terms, I might not immediately uncover them.
I was looking into porting an old VB6 (200k+ LoC) to VB.Net in VS2015. Mostly just poking around to determine viability. Using a project converter, and have resolved most of the initial errors, and am familiar with how the Error List works.
However, it is throwing a new one at me. It now only has two lines of error, both showing the same thing. They both say:
" & ErrorName
That's a Quote, Ampersand, and ErrorName. That's all that show up on the error list line. No file. No line number. Double click on them does nothing.
I thought perhaps the project was corrupted, so I completely re-created it, adding all the modules, forms, classes, etc again, and it found a lot more errors to fix, which I fixed, and now these two lines show up again.
Does anyone have any indication where this is coming from, or, better yet, how to fix?
I've seen VB programmers report this misbehavior before, never with a good lead to explain the problem. It is specific to VS2015, the Roslyn integration caused many issues. In general a very buggy release, be sure to apply all available Updates, currently up to Update 3. If you have a license that includes an MSDN subscription then I recommend you install VS2012, the last "good" version of VS that was not yet affected by Microsoft's new focus on agile development.
I think the underlying issue is caused by the IDE simply not parsing the compiler error message correctly. Probably having to do with the statement with the error getting quoted in the message. Getting only part of the statement text and it fumbling quotes is a pretty good hint that this is where it went wrong.
So look at the actual output of the compiler, decent odds you'll now see the full error text. Use Tools > Options > Project and Solutions > Build and Run. Change the "MSBuild output build output verbosity" setting to Normal. After the failed build, use View > Output to see the compiler output. You'll probably have a lot of messages, consider copy/pasting the content.

Complete List of Commands of SELENIUM IDE [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I m new to selenium and in first phase i am trying hard to grasp IDE commands but the main problem that i m facing s that i m unable to search a Single helping material which clearly tell me the following points if any one knows kindly refer me
Complete List of Commands
Commands with reference to scenario(e.g when we use asserttext or
verify text)
what will be the values of Target and value.
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html
This is the complete reference that contains
All the commands supported.
Descriptions to the methods including explanation of the difference between assert and verify.
The target is usually the locator of the element. The value is usually a parameter of the method - for instance, when you're typing into a field, the value would be the text you want to type in. More in the reference of every single command - not all the commands take both target and value, some have their values restricted etc. See your particular command to know what parameters it needs.
Anyway, the most helpful piece of documentation for IDE is still the official docs even though they don't really have a list of all commnads.
1) If you are using the Selenium ide for firefox the full list of commands is visible by clicking the down arrow in the command section.
Failing that there should be plenty of useful information in the selenium documentation
http://docs.seleniumhq.org/docs/index.jsp
2) This one I can't help with very much, as I generally use asserts everywhere. If i want my script to fail at a particular point if text is not present in java I use something like
assertTrue(driver.getPageSource.contains("Text to verify");
3) Target is the element and value is the current value of that element.
Example - Assert that text is present
Command - assertTextPresent
Target - Blank
Value - Text to search for
Example 2 - Field contains certain text
command - assertTextPresent
Target - id=idOfField (id, xpath, css, name etc)
Value - Text to search for
http://software-testing-tutorials-automation.blogspot.in/search/label/selenium%20ide
This website have a lot of IDE examples and tutorials. If you are beginner if so this website is the best I think.
I think this is the most complete and most readable list of the selenium IDE commands:
http://www.frontendtest.org/blog/selenium-ide-commands/

vba code refactoring - are there any tools to assist? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to refactor my VBA code. I am so used to using refactoring in Java-based IDEs for a number of years. Does VBA editor support any refactoring or are there any add-ins? MZ Tools did not have any such functionality.
I want to be able to do at least the following:
1. Rename variables
2. Split Procedures into sub-procedures to make the code more readable
3. Change the scope of the variable from global to procedure and vice-versa
Disclaimer: I'm heavily involved with this project.
Rubberduck is an open-source add-in for the VBA/VB6 IDE under [very] active development, that includes this functionality.
Version 1.3 includes a Rename refactoring:
Version 2.0 (beta available, still stabilizing) includes a dozen refactorings:
Introduce Parameter promotes a local variable to a parameter
Introduce Field promotes a local variable to module scope
Encapsulate Field turns a public field into a property
Move Closer to Usage moves a field that's only used in 1 procedure, into that procedure. Or moves a local variable immediately above its first use.
Extract Interface lets you pick what class members to extract into an interface, creates a new class modules with stubs for them, and makes the original class implement the extracted interface.
Implement Interface creates stubs for all members of an unimplemented interface, so you don't need to create them manually by selecting them one by one in the code pane dropdown:
Implements IClass1
Public Sub IClass1_DoSomething()
Err.Raise 5 'TODO implement interface member
End Sub
Public Function IClass1_GetFoo() As Integer
Err.Raise 5 'TODO implement interface member
End Function
Sub DoSomething()
End Sub
Function GetFoo() As Integer
End Function
More refactoring tools are on the project's roadmap (including Extract Method), which you can follow on GitHub.
The only 'refactoring' tool I know of in VBA is Ctrl+F and Ctrl+R.
I use V-Tools for refactoring-like work as it will do find / replace in objects, not just VBA code.
http://www.skrol29.com/us/vtools.php
Yes there is.... almost
In the good old days i used this one.
http://www.moshannon.com/speedferret.html
helped me alot and I think i have the 3.5" disks somewere ;)
The trick is to copy your excel code to Access or VB6 and do your refactoring there.
Replacing scope: solution is creative naming and using replace.
spitting procedures... well thats a manual I'm sorry.
It's usually not worth it unless you have some serious excel vba code, I would recoment converting most of it into c# or VB.Net dll where you can do refactoring, testing and some modern magic and only do as little you can in VBA.

why is LaTeX / pdflatex compiler so 'funky' with multiple compiles necessary and bogus error messages, etc, compared to c++? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there a simple explanation for why the latex / pdflatex compiler is funky in the following two ways:
1) N multiple compiles are necessary until you reach a "steady state" version. N seems to grow up to around 5 or 6 if I use many packages and references.
2) Error messages are almost always worthless. The actual error is not flagged. Example:
\begin{itemize} % Line 499
\begin{enumerate}
% Comment: error: forgot to close the enumerate block
\item This is a bullet point.
\end{itemize} % Line 503
result: "Error on line 1 while scanning \begin{document}", not very useful.
I realize there is a separate "tex exchange" but I'm wondering if someone knowledgeable about c++, java, or other compilers can provide some insight on how those seem to support single-compile and proper error localization.
Edit: this document seems like a rant justifying the hacks in latex's implementation, but what about latex's syntax/language properties make the weird implementation necessary? http://tug.org/texlive/Contents/live/texmf-dist/doc/generic/knuth/tex/tex.pdf
From a LaTeX point of view:
You should at most require 3 (...maybe 4) to reach a steady state. This depends not on the number of packages, but possible layout changes within your document. Layout changes cause references to move, and these references need to be correct (hence the recompile until they don't move).
Nesting of environments is allowed (although this does not address your problem directly). Also, macro definitions act as replacement text for your input. So, even though you write \end{itemize}, it is actually transformed into a bunch of other/different (primitive) macros, removing the obvious-to-humans structure and consequently also the bizarre error message. That's why some of the error messages are difficult to interpret.
wrt. point (2):
Considering that most of the errors are picked up while parsing macro defenitions that get expanded, My guess is that errors wouldn't be useful to the user even if they contained locale and specific causes, because they don't translate well into what you see when you view the code.
Still, it would be useful if they were just a little bit more explicit :/