-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSHint config bug crashes VS 2013 #386
Comments
We should exclude bundled files by default. |
Your specific problem is that that field is parsed as a series of regexes. We should add better error handling. |
@SLaks Well, it appears that I can't even do that now. Now it is crashing when I try and create the bundle (even though my custom Ignore Files" is not there any longer). It asks for the bundle name and I press OK. It then creates the custom bundle file and then creates the combined JavaScript file, and then crashes before it is done and updates the csproj file. In this case it is fortunate that the csproj file did not get updated yet because I can at least reopen the project easily. Then, I can delete the bundle files. |
Do you have a Node.js project in your solution? |
No, I don't have Node.js. Further, I just realized that I no longer have access to JSHint via the right-click context menu. It's there, but it is grayed out. The only options I have available at this point when I right-click on a .js file are
Everything else is disabled. Any ideas on how I get it back? Uninstall and reinstall WE? |
What's in your ignore list? |
At this point, just the defaults of |
Try deleting (or renaming) the WE settings file (from your solution directory or |
OK. I renamed my settings file in my So, this is really a sidebar question and hate to open a ticket just to ask, but on http://vswebessentials.com/features/html it says "Markdown: See the compiled markdown in a preview window inside Visual Studio..." How?! I can't figure this one out. |
Strange... the only differences I see with the two WE2013-settnigs.xml files (the one you asked me to remove and the newly recreated one) are that I set laxbreak and laxcomma to false (defaults to true). The other difference is that my old <ignoreFiles ends in "; " and the default one does not. Not sure why that would effect the right-click menu... ...
<JsHint_ignoreFiles>kendo.*; globalize.*; </JsHint_ignoreFiles>
...
<JsHint_laxbreak>false</JsHint_laxbreak>
<JsHint_laxcomma>false</JsHint_laxcomma>
... Either way, it still crashes now when trying to create a bundle. |
I suspect the problem is the trailing semicolon. |
Perhaps... But that is what the value was. Now that I have reset the settings file it is back to the default value of VS still crashes if I try and create a JavaScript bundle... |
sorry hit the wrong button... Didn't mean to close the issue... |
I can't reproduce that. Can you attach another copy of VS and see what the exception is? |
When you say you can't repro the issue, did you do the entire repro? That is, add the additional ignoreFile to skip processing the bundled JavaScript? I say this because I was able to first create the bundle, but once I added the extra ignoreFile that's when I could no longer create a bundle (even after restoring the ignoreFile value back). Now, as far as "attach another copy of VS and see what the exception is", do you have something I can read up on how to attach VS to VS? I have not done that before and I am unaware. Also, when it does crash, I get the Windows dialog that asks if I want to send an error report to Microsoft--I am not getting the one that asks if I want to debug the application. So whatever is going on, it's crashing hard. I will probably be offline for the rest of the evening, but if you leave further details, I may have some time tomorrow. |
Open a second copy of VS, click Debug, Attach to Process and select |
BTW, to answer your other question, check the Markdown section of WE options. |
I saw the update that was made and I applied it and restarted my Visual Studio. Next I tried to create a bundle, but it still crashes. This time I have a stack trace (per @SLaks instructions).
Not much to go on... Is there any place else that I can reset some settings so I can at least get back to the point where I can create a bundle? Will doing an uninstall/reinstall do that? |
That's the exception message. |
The exception message is in my prior post ( Anyway, I uninstalled and reinstalled WE2013 (with the required restarts in between) and it still crashes trying to create a bundle. This time I looked at Call Stack window in the debugging copy of VS and all it says is |
@JimF42, uncheck: |
I can now get a bundle created without crashing, so this may be a clue for you. When I first created a bundle, I seem to remember, maybe, that I completely renamed the bundle. The WE dialog that comes up to ask for the name prompts with "Specify the name of the bundle" and defaults to "bundle1". To get the bundle to crash, I simply said Now I am back to my original issue of crashing VS2013 when I specify my extra filter (but I can't get it to repro 100% of the time--I will work on it and let you know if I figure out how). But, regardless, I disabled "Just My Code" per am11's suggestion and either between that or just because I thought about looking in the Output window, when it does crash with the following exception, I can find a more useful stacktrace in the Output window. The filter here was when I was trying to use bundle as my naming convention and filter.
|
Actually, it is consistent. What I didn't realize is that the filter I added was being removed from the WE2013-settings.xml file. Perhaps because I have two copies of VS2013 running (one attached to the other). As soon as I re-add the filer (I appended The stack trace is the same as the one above except for how I changed the filter name this time. ( |
I already fixed that exception in 66f602c |
It crashes when you specify I'll fix that. |
So how do I tell which version I have then? My VS2013 prompted me this morning that a new version of WE2013 was available and I applied it. Later, I also went in to Extensions and Updates and removed it and then re-added it. All I am told in Extensions and Updates is that it is version 1.5. Is there a place on your website to download hotfixes? |
That has not been released yet. If you want it now, you can clone this repository & build it yourself. |
No, that's OK--I don't need it that badly that I can't wait for a release. I was more just trying to work through the bug I found so that it would be fixed. I just assumed that the version that was released today was because of the bug fix. Now, in regards to my Markdown question, you replied
but that did tell me how to use it, just how to configure it. I finally tracked down one of your blog posts and found the information I needed in a screenshot. http://blog.slaks.net/2013-12-10/syntax-highlighted-markdown-code-blocks-web-essentials/. I need to have a file that has an extension of Thanks for you help on this! |
Handle nested extensions properly. Fixes madskristensen#386
The short version:
I went into VS Options/Web Essentials/JSHint and added a new file to ignore and now VS 2013 crashes everytime I open the project. Luckly, I can just open VS 2013 and remove the option before opening the project. I changed "Ignore Files" from
kendo.*; globalize.*
tokendo.*; globalize.*;*bundle.js
The longer version (background):
I am working on a project that has multiple JavaScript files and those files include inline comment based JSHint options to remove certain messages. In my case, I am using
/*global varName*/
and/*exported varName*/
. This all is working as expected. Next, I decided I wanted to try a using Web Essentials JavaScript Bundle. Again, works as expected except I was getting JSHint errors because JSHint was also running against the bundled file and the JSHint options copied to the bundle were "confusing" the situation. So I looked for an option to tell JSHint not to run against bundled files (didn't find one). So, I decided I would end all of my bundles with "...Bundle.js" (like myAppBundle.js) and so I tried to add it as an ignored file. After that, everything went south.I am using VS 2013 Ultimate on Win 7 64-bit. I have about 16 extensions (including yours) installed, so let me know if you need a list of those or whatever else you need to know.
The text was updated successfully, but these errors were encountered: