I am trying to debug a project using the Chrome browser and even though I commented out some statements in visual studio, still the browser is showing the statements.
The lines commented:
Debugger window
I tried to clear the cache in the chrome browser and tried to build and debug again but the browser is not picking up the changes. Can anyone please help me what could be the issue.
Related
Could someone reply with the exact steps to rub a debug session using MS Visual Studio, for a Html/Javascript WebPage, using the Chrome Browser?
I am really confused between LiveServer, Launch Chrome, and the Run and Debug control on the left side of the IDE. I seem to get it to work at times, but wind up with multiple Chrome Browsers displayed. Really would like to know the correct process is.
Thanks so much.
I am working on an apache cordova app. I do two different debugging, first is on my localbrowser(chrome) and then on an actual device. When debugging in chrome, I set break points inside VS and all are hit. Then when on chrome when I open the developer console, it stops the debugger. I swear that this never happen before. Any suggestions? I found some post that are almost related to my problem but it never solves them.
At first I thought the debugger stops because of my option settings in Visual studio, but I started a new blank(apache project) project and it works. Then I added my js, html, css files and settings to this new blank project. And there it goes, the debugger stops when I open chrome developer tool. I ran out of ideas. Please help.
Prior to V 63 of chrome, it would not allow multiple remote debugging sessions. Opening the chrome debug tools would take over the only available connection, and terminate the one held by VS.
However this has now been rectified by the chromimum team !
Unfortunately there is still a problem with the Visual Studio debugging session getting terminated when F12 is hit.
There is a workaround, and hopefully the VS team will correct the underlying issue. See my post on MSDN for full details
I try to debug it in my VS2017, All projects get the same result as yours, it would stop VS debugging if we click F12 to start the chrome developer tool.
As you said that the blank project worked well in your side, if possible, you could check that whether you changed any settings in your side. I just use the default settings.
Of course, you could also reset your VS settings in your side, and then re-debug your blank project, view the result.
TOOLS->Import and Export Settings Wizard->Reset all settings->select “No, just reset settings, overwriting my current settings”->Choose a Default Collection of settings.
My understanding it is the normal action if it stopping VS debugging after you start the browser debugging, since generally we could use one debugger for one process.
In VS 2017 Go to Tools->Debugging->General then check
Enable Javascript Debugging For ASP.NET(Chrome, Edge, and IE)
Hope that helps you.
I want a stand-alone editor and debugger, basically an IDE for JavaScript. I am presently using a mix of just running stand-alone scripts on the command line and editing them in Notepad++, and sometimes the Scratchpad that comes in Firefox Developer tools.
But the Debugger in Firefox Developer Tools does not show me the sources from ScratchPad. How do I make it show them?
Besides, I am unable to set breakpoints in the ScratchPad editor.
This issue was fixed in Firefox 47 (see bug 1252077), you can now use debugger; statements in your Scratchpad code or set breakpoints directly in the Debugger. The Scratchpad script's source should appear there after you have run the script at least once. Make sure you have Dev Tools open.
It's a bit awkward though since Scratchpad scripts don't update in the Debugger window after they were modified in the Scratchpad, you need to refresh the page you're on first or use Execute → Reload and Run in the Scratchpad.
Scratchpad works great except I can't figure out how to access the breakpoint scope in it. Anyone have an idea how to do that? Was automatic in Firebug.
Visual Studio 2008 comes with nice javascript debugging features.
But I have played a little with NetBeans debugger wich has installed an ugly Script Debugger from Microsoft to my IE... Normally IE should ask what do I want to use for debugging, but now I can't start debugging with Visual Studio, the Script Debugger is started automatically... After uninstalling the Script Debugger I can't debug in IE at all. Even attaching to iexplore.exe process doesn't helps...
Has installed the Script Debugger again... :(((((
How can I get back my Visual Studio debugging working in IE again?
I have the same problem. It's not quite resolved yet, but I'll share what I have.
To let IE see the debugger again do this:
1. Open Visual Studio.
2. Go to Tools > Options > Debugging > Just-In-Time.
3. Enable Script checkbox, click OK.
4. Close Visual Studio.
Now when I try to debug it opens Visual Studio but gives this error:
"Unable to attach to the crashing process. An error occurred that usually indicates a corrupt installation (code 0x80040155). If the problem persists, repair your Visual Studio installation via 'Add or Remove Program' in Control Panel."
When I get back in the office tomorrow I'll try repairing Visual Studio.
make sure you don't have script debugging disabled in IE Settings. May not be the answer to your situation but I forget this all the time.
How to debug Windows Script Host, VBScript, and JScript files. Especially
make sure that the following registry
key is set to 1:
HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings\JITDebug
If you use a global error handler window.onError, this handler prevents JS errors from being caught and IE does not asks if we want to debut with VS.
As another alternative, you can attach VS to IE process, then put breakpoints within any JS script that is available in resources view. VS should display (Script,x86) next to IE process in process list, if script is not in list it means that you haven't properly unchecked "Disable script debugging" as mentioned by #Jon Erickson
IE (7) Tools -> Manage Add-ons -> Enable or Disable Add-ons...:
Disable the troubling debuggers.
I encountered a strange problem today. Whenever i put a breakpoint in one of my js files, the breakpoint is not hit.
I use Visual Studio 2005 in combination with TFS.
In ie the disable script options are both disabled.
The only thing that changed is that I installed Visual Basic 6 for an old project, but I don't see how that would impact debugging via Visual Studio 2005.
Did anyone had this problem before, or better does anyone know a solution?
thx.
In order for Javascript debugging to work the Visual Studio needs to be attached as a debugger to the IE process and it needs to be able to resolve the phyiscal path of the javascript file with the URL of the same script loaded in IE.
Have you checked that when you start debugging in VS that it actually attaches to the IE process that gets spun up?
Customizer your toolbar, on the commands tab select the debug category then find the "Script Explorer" command, drag it to a tool bar. Close the dialog.
Using script explorer you should be able to find the script that ought to have the break point on. Ordinarily VS is able to combine the root path it specifies for the developer web server with the physical JS file path in order to determine what its URL would look like from the browsers perspective, it can then novate the break point from the physical file to the script loaded in the browser.
you can also use a debugger; statement in your js. IE will then prompt you to debug the script file and should give you the option to debug in Visual studio 2005/2008 if you have them.
Explained here
A collegue found the issue: the Just in time debugger was only set to handle Managed and native code, and no scripting.
I just had to re-set it in the visual studio options pane.