-
Notifications
You must be signed in to change notification settings - Fork 356
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
NTVS projects do not run debug mode. #268
Comments
If you look at the properties for your project, are the "Node.exe path" and "Script (startup file)" both correct and pointing to the right files? If you try launching with F10 (which will try to run and break on the first line) is the behavior the same? If you open the Output window from the View menu, do any of the relevant outputs (e.g. Build, General, Debug) contain any useful info? |
@billti Thank you so much for responding. Yes. The Node.exe path is correct. This happens for all NTVS projects, including example projects from Shawn Wildermuth's PluralSight course. Looking through several of these projects, I see "C:\Program Files\nodejs\node.exe" for all, which is where node is installed. None of these projects have script arguments. They are pretty simple example projects. Yes, F10 or "Step into new instance" does the same thing. There is nothing in Output: General. There is no Debug selection. In Build, if I just build the project or solution, it has only the one line summary: If I try to Run again though, Build is cleared; Output is all blank again. |
"Script (startup file)" is more important the "Script arguments" - does this have a value? I assume this is also happening for new projects you create (e.g. the Express app template), and not just samples from elsewhere? If so, this is strange indeed. If you run from the command line with debugging (e.g. "node --debug startupscriptname.js") does it work? (i.e. you enter the command-line debugger, and perhaps get a firewall prompt). You could also try launching VS as an Administrator and see if this makes a difference (in case it's a permission issue). Finally, I see you are running 1.0 of Node Tools. There have been a few breaks and fixes in debugging since then (e.g. baef9a9). Could you try one of the latest Dev builds and see if that works for you? (See https://github.com/Microsoft/nodejstools/releases ). |
@billti - Script (startup file) was only recently added into the project properties page (see #153) Instead, you can see the current value by selecting your project node, and pressing F4 to open the properties window. To select a new startup file, you can right click on any javascript file, and select "Set as Node.js startup file" |
Also we did fix some debugging issues, so it's worth upgrading, but I'd be surprised if it fixes this issue, as non of them showed would have shown these symptoms...plus this issue is occurring with the default project, so the startup files should be fine... we also give an error if node found. What happens if you execute a command like If you press Ctrl+F5 (to launch without the debugger), does it work? Lastly, is the behavior any different if you use an older node version (e.g. 0.10.33)? |
@billti Sorry. I misread that. Startup file points to a .js which, for example, in a fresh new project such as I'm looking at right now has one line: console.log('Hello world'); Running node from the command line works in every way I have tried. I just now tried running the script exactly as you suggested. It works. This is the output: The path, by the way, I copied directly from my Startup file property to be sure it is correct. Also, seeing the debugger port, I went ahead and tried manually entering that into the Debugger port property for the project. This doesn't change anything. So I removed that. @mousetraps CTRL-F5 does pop up a console briefly. I added this to get the window to stay up until I closed it, and can see Hello World: The interactive window also works:
All of this was done with version 1.0.30324.01. So today hopefully, I will try the same with the latest version and an older version and let you know if there are any differences. Thank you again so much. |
I have now tried these versions of Node Tools: All symptoms have been identical, other than some new features showing up with the newer NTVS. Script (startup file) shows up in Properties and has the same file referenced, as already discussed. And along with the other two blank output windows, there is now also a blank Tests window. I also did try running Visual Studio as Administrator. No luck. Everything is the same. Is there any way to get more log information from this process or something? |
closing this issue as it's been a while and we've significantly improved our debugging experience since. Please let us know if you're still running into issues with the latest releases, and we'll investigate. https://github.com/Microsoft/nodejstools/releases |
I have the same problem with the latest tools, please see #1265 |
I'm not sure what is peculiar to my configuration that causes this, and I'm having trouble gathering any additional information about the problem. I have posted to StackExchange and a PluralSight discussion, where you can find additional details.
When I try to start any NTVS project in Visual Studio, it seems to process for a split second, and then it just stops. This happens even for a brand new console app (hello world).
This is what I'm running:
MS Visual Studio Premium 2013 V. 12.0.31101.00 Update 4
.Net Framework Version 4.5.50938
Node.js version 0.12.6
Node.js Tools 1.0 for Visual Studio 2013 version 1.0.30324.01
Resharper 8.2.3
The text was updated successfully, but these errors were encountered: