Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VAX not highlighting javascript in <script> tags
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

QuadrupleA
New Member

9 Posts

Posted - Oct 30 2016 :  2:44:01 PM  Show Profile  Reply with Quote
VAX Version 10.7.1946.0 built 2013.06.26
Visual Studio Professional 2012, v. 11.0.60610.01 Update 3

For some reason VAX syntax highlighting for javascript in <script> tags in .html, .aspx and other pages no longer works. I get the default visual studio highlighting with just keywords like 'while' and 'function' in blue. If I open a .js file the full VAX highlighting is fine.

I think things got screwed up a week or two ago when I followed the advice on this page ( http://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=12151 ) to resolve an error that started appearing that said VAX.Interop.dll couldn't be loaded (which prevented VAX from working at all).

'accord' said:

quote:
Close Visual Studio and then delete all files including sub directories:
C:\\Users\\<username>\\AppData\\Local\\Microsoft\\VisualStudio\\11.0\\ComponentModelCache\\*

and all .cache files in the following directory and its subdirectories:
C:\\Users\\<username>\\AppData\\Local\\Microsoft\\VisualStudio\\11.0\\Extensions\\*.cache


Which I mistakenly interpreted to mean "delete all .cache files in 'Extensions' AND delete all subdirectories in 'Extensions'". Which completely screwed up all the extensions on my Visual Studio install including VAX. The wording is a little unclear on that post, if it's possible to go edit it a bit it might save some other poor soul the same fate.

Anyway I managed to do a repair install of VAX and a number of the extensions I used, and things are mostly back to normal, but this <script> highlighting problem persists. I notice the "list methods in current file" Alt-M menu is still being populated, which I guess would indicate VAX is doing some sort of parsing of the javascript in <script> tags, just not highlighting.

Possibly related, Visual Studio now hangs for 5-6 seconds several every minute or two while editing javascript in <script> tags. The window shows "not responding" for a while then resumes. I guess that's probably the worse of the two problems so if it happens to be related that'd be awesome to fix too.

The hangs go away when I disable VAX, and don't occur when editing plain .js files.

Thanks in advance,

-Luke

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 01 2016 :  4:34:26 PM  Show Profile  Reply with Quote
Let's focus on the hang now, since it is the more serious of the two.

Can you please try to capture a minidump of the hang and send it in? I know 5 seconds isn't much, hopefully it'll be enough to press the break button:
https://docs.wholetomato.com/default.asp?W303

For the syntax coloring, the first thing to try is to check if this registry entry is (still) set:
https://docs.wholetomato.com/default.asp?W326
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 01 2016 :  8:01:08 PM  Show Profile  Reply with Quote
Thanks for the reply - so I just re-enabled VAX for .html files (I had it temporarily disabled for that extension to get past the hanging). And actually it looks like that problem has gone away - I tried all manner of javascript editing in the HTML file I was having problems with and didn't get any unusual hangs. The List of Methods in Current File menu is updating properly, VA rename works, etc. So I guess that one might have been something temporary. I'll keep procdump handy in case it comes back.

The syntax highlighting is still not working - I added the following reg value and restarted visual studio:

\HKCU\Software\Whole Tomato\Visual Assist X\VANet11\RestrictVaToPrimaryFileTypes = 00 (BINARY)

I also have mostly-empty VAOpsWin and VATE keys alongside VANet11, I assume those are unrelated but if not let me know.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 02 2016 :  5:48:45 PM  Show Profile  Reply with Quote
quote:
I also have mostly-empty VAOpsWin and VATE keys alongside VANet11, I assume those are unrelated but if not let me know.

Yes, that's okay. In VANet11 you should have around 300 keys.

quote:
The syntax highlighting is still not working - I added the following reg value and restarted visual studio:

\HKCU\Software\Whole Tomato\Visual Assist X\VANet11\RestrictVaToPrimaryFileTypes = 00 (BINARY)


The registry setting is good, but make sure first you exit all instances of Visual Studio and after you edit the registry entry, because it gets overwritten when you exit Visual Studio. Can you please double-check that it's still 00?
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 02 2016 :  11:17:32 PM  Show Profile  Reply with Quote
Thanks - so yeah, I had quit out of VS beforehand. Just double checked, that registry value is still set to 00.

If it doesn't get fixed it's not the end of the world obviously - if you have any other things to try though let me know.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 03 2016 :  5:57:57 PM  Show Profile  Reply with Quote
One more thing to try is to do a disable-enable cycle:

1. disable Visual Assist in extension manager (Tools -> Extensions and Updates)
2. restart Visual Studio
3. exit Visual Studio
4. start Visual Studio
5. enable Visual Assist in extension manager (Tools -> Extensions and Updates)
6. restart VS

Since both Visual Studio and Visual Assist uses coloring, the color order sometimes change unintentionally, causing the syntax coloring to be overwritten by Visual Studio in older versions and this trick can help to reset the proper order.
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 03 2016 :  6:33:37 PM  Show Profile  Reply with Quote
Thanks accord - just gave that a try, no luck unfortunately.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 07 2016 :  7:58:58 PM  Show Profile  Reply with Quote
1. Does the syntax highlighting works in other type of files? (e.g. C# or C++)
2. Can you please try opening a .VB file to see if it works there?

I am trying to figure out why the coloring fails for you.
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 07 2016 :  8:15:38 PM  Show Profile  Reply with Quote
Yup, highlighting works great in C/C++ (which I use a lot). Just tested C# and VB, those work as well. Plain .js files also highlight correctly. So it seems to be just javascript embedded in <script> tags.

An uber-minimal example file that doesn't highlight:

<html>
<head>
  <title>Test</title>
</head>
<body>

  <script type="text/javascript">
    function test() {
        alert('test');
    }
    var foo = 'bar';
    test();
  </script>

</body>
</html>

The "test", "alert", "foo" identifiers are all the default white on black (I use the 'dark' color scheme) rather than VAX's usual orange for functions, tan for user-defined variables, etc.

I tried renaming the above file from "test.html" to "test.aspx" to see if it was a problem with the .html extension specifically, but the problem happens on "test.aspx" too.

Thanks for sticking with this one -

-Luke
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 08 2016 :  3:25:00 PM  Show Profile  Reply with Quote
I tried to reproduce the problem here and I was able to. Are you sure that you didn't have any extension installed to color js code in html files originally, before you lost your extensions? It seems VA doesn't support this scenario.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Nov 08 2016 :  9:25:28 PM  Show Profile  Reply with Quote
Do you have any other IDE's installed on your system? Is it possible you used to be using an older version of Visual Studio?

Testing this with VA 1946, I discovered that I am seeing the colouring you are reporting, but only in VS2005 and VS2008. It does not occur in VS2010 or VS2012. So this could explain why this has changed for you.

zen is the art of being at one with the two'ness
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 09 2016 :  2:51:30 PM  Show Profile  Reply with Quote
Hmm - I just finished a javascript-heavy 3 month project in which a lot of the code was in .html files, and I'm pretty sure it had the full highlighting. I was definitley using VS 2012 throughout that time (it's been my main IDE for 3-4 years).

I do have other versions of VS on the system, mostly there for compiling older or newer C++ projects using the command line compilers.

I could be just an idiot and not remembering correctly - is it possible to check with a VAX developer and see if support was ever developed for on-page javascript in VS2012? Could it have broken in the latest VS update maybe?

There was definitely a problem that came up in mid-October (that VAX.Interop.dll error) that was I believe when this started. Not sure if it was caused by a Windows update, an update of my IDE etc., wish I would have payed more attention at the time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Nov 09 2016 :  6:33:26 PM  Show Profile  Reply with Quote
Can you please try opening your test file in VS2005 or VS2008, assuming you have one of these IDE's installed on your system, to see if you are seeing the same behaviour I am?

There were a lot of changes between VS2008 and VS2010 support, since the editor changed, and required a significant change to how the colouring works, so it makes some sense that the colouring change took place at the same point.

zen is the art of being at one with the two'ness
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 09 2016 :  9:34:45 PM  Show Profile  Reply with Quote
So I double checked - the version of 2008 I have is Visual Web Developer Express - VAX isn't installed on that (haven't used it in years). So it just has the standard syntax highlighting.

I don't have 2005, think that was a different computer.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Nov 14 2016 :  10:08:03 PM  Show Profile  Reply with Quote
Is it possible that the colouring could have come from something or somewhere else?

In case this used to work, and then stopped working later on, I have tried VS2010 with VA 1819, which was the first version to support VS2010.

I have also tried VS2010 and VS2012 with VA 1912, which was the first version to support VS2012.

I still cannot reproduce this colouring in VS2010 or VS2012. So this suggests either the colouring came from somewhere else, or there was something unusual about your system configuration, that I am not yet trying in my testing.

zen is the art of being at one with the two'ness
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 15 2016 :  12:42:11 PM  Show Profile  Reply with Quote
Thanks - I'd suspect it was an earlier build of Visual Studio 2012 rather than an earlier build of VAX - my VAX updates subscription expired at version 1946 unfortunately, so I've been on that version for the past couple years. Definitely wasn't VS 2010, I never used that with VAX. I'm pretty sure VAX had full support of <script> tags until recently, but like I said there's a chance I'm just being an idiot and remembering incorrectly.

Anyway not the end of the world if we can't get it working.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Nov 15 2016 :  1:29:49 PM  Show Profile  Reply with Quote
If you have a second machine, it might be worth looking and seeing what is happening there, and how things are working.

You are very clear in what you remember seeing working and happening, so its fair to think you did see this, but so far I cannot see any sign that VA has ever done this in VS2012, so if VA did do this for you, I am not sure what triggered that behaviour. But if you think of something else, I can try some more tests and experiments here to see if this helps.

zen is the art of being at one with the two'ness
Go to Top of Page

QuadrupleA
New Member

9 Posts

Posted - Nov 15 2016 :  3:36:38 PM  Show Profile  Reply with Quote
I don't have any other machine set up as a development box unfortunately. If I find any other clues or things to try though I'll let you know.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Nov 17 2016 :  4:20:34 PM  Show Profile  Reply with Quote
Thank you for the update, and sorry that we did not get to the bottom of this. Something strange happened here, I am just not sure what that was, or what else to try, or where to look.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000