-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Bug in ChromeDebuggingAttachment
settings
#47
Comments
Are you talking about this => https://www.youtube.com/watch?v=pcjeJ7pVjKo If yes, yes! it is possible! |
The video looks exactly what I want (I am away at a conference, and don't have access to my work computer, but I will try the liveServer.settings.ChromeDebuggingAttachment: true. I assume that the launch.json should look something like this:
|
Okay, First try to close all instance of Google Chrome & start live server. It will open a new window of Google chrome. Now start chrome debugging attachment. It should work, |
Hi @DrYSG, Thanks for reporting! Just now I've tried, it's not working! May be some how code is broken! I've have to debug it. A workaround : (you can you commands through
{
"liveServer.settings.AdvanceCustomBrowserCmdLine": "chrome --remote-debugging-port=9222"
} |
I must still be missing something. I first launched the live server, had the web page running inside of it, Then I tried to Attach to to Chrome.
yes, I did shut down all instances of Chrome (V 62) on Windows 10. and yes, this is what the url the Chrome browser is showing: http://127.0.0.1:5500/dist/webview2.html Launch.json
settings.json (under .vscode)
|
remove the settings Close all chrome instance, stop live server, start the live server again... |
Ok, I did that, and yes it is now stopping at the breakpoints. The odd thing now is that that I have a minified bundle.js, with sourcemaps (I use rollupjs). But inside of VSCODE, I see that I can set the breakpoints at the original source, but the locals are all from the minified version (e.g. the local variable sprite, is now "i". Is this a inherent limitation in VSCODE debugging, and in which case I should use Chrome Debugger? |
Sorry! I don't get your point! Can you give me an example.? If you have minified version of js & sourceMap, you can add breakpoints at original js file (not modified version). |
See above screen shot. The breakpoint is at line #110, which is in the updateSprite(sprite) funnction, I wanted to look the value of the passed in variable sprite. I have stepped the program to line #112, at this point the local variable loc should be defined. But if you look at the left of the VSCODE debug window, in the pane called local variables, you see only This is because I am using rollupjs to take the source, and bundle it and then minifiy it (I like rollupjs better than webpack for this work). The VSCODE debugger is smart enough to use the sourcemaps in bundle.js to show the correct line, but it does not do the local variables. Is this a inherent limit in VSCODE? Because the Chrome native debugger (F12) does not do this, it shows the local variables with the real names. |
Ohh! I got your point! if Chrome native debugger doesn't behave like this, you could be a bug. (I really don't know). Since it is not related of Live Server, I can't help you! Best way to open a new issue request here https://github.com/Microsoft/vscode-chrome-debug/issues. BTW, one question! When you're hovering on a variable, it that working? and if you do |
That was two questions!
So it has nothing to do with live-server. I will submit a question to the vscode folks. |
Don't close now, I'll check later (after 16th Dec) |
This issue has been resolved with v3.0.1. Please update the extension and thanks for the reporting. If you like the extension, please drop a review to vscode marketplace. |
Hi I'm not sure if I'm missing something but it still doesn't seem to work for me and I get that same message: What I did was: in launch.json:
and In the "target" field of Chrome, appended |
Very nice tool.
Is it possible to use the VSCODE attach to the live server? Or to Launch the Live server from the launch.json . If so , how does one do that? Or is there a fundamental limitation that I have to use the Chrome Debugger (which I really don't mind, I just wanted to see if I could use the VSCODE debugger also).
Launch.json
The text was updated successfully, but these errors were encountered: