microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 283 forks source link

msedge type does not launch the URL in browser window #2018

Closed yuqizhou77 closed 5 months ago

yuqizhou77 commented 5 months ago

I have a project which has launch.json in .vscode folder. The content of "launch.json" is just launch edge with an url { "version": "0.2.0", "configurations": [ { "name": "Launch Edge", "request": "launch", "type": "msedge", "url": "https://www.bing.com" } ] } When I run F5, the browser was opened in a modal window that url address is hidden and I cannot resize the window. image I am hoping it can launch the browser like this image

VS Code version: Code 1.90.0 (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:33:54.889Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (16 x 2793)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software| |Load (avg)|undefined| |Memory (System)|63.95GB (53.97GB free)| |Process Argv|--crash-reporter-id ece99cbf-69d9-46cf-8dd2-a4b1f506865a| |Screen Reader|no| |VM|0%|
Extensions (1) Extension|Author (truncated)|Version ---|---|--- vscode-yaml|red|1.15.0
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelc:31048052 dsvsc021:30996838 f3je6385:31013174 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 26j00206:31048877 ```
connor4312 commented 5 months ago

/jsDebugLogs

vscodenpa commented 5 months ago

Please collect trace logs using the following instructions:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

yuqizhou77 commented 5 months ago

vscode-debugadapter-bcb10663.json.gz Here is the log.

connor4312 commented 5 months ago

It looks like your machine or organization has set up Edge to force you to sign in. So what's happening is that the "force sign in" window is the 'tab' that opens and the debugger then is navigating that to the app you want to debug.

The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\BrowserSignin controls this setting. You can set it to 0 to disable sign in or delete it to restore the default behavior.

If this is an organizational setting you may not be able to change that, I think the only alternative would be using Chrome. I'll put in a change to avoid this behavior which'll be on the next nightly https://github.com/microsoft/vscode-js-debug#nightly-extension

yuqizhou77 commented 5 months ago

Thanks for the quick fix. I tried the latest nightly extension, however when I was prompted to select a profile, I am not able to make any click and then feels like it timed out and debug failed. image

log: vscode-debugadapter-250ea6e3.json

After that I tried to F5 again, it signs me in directly and launch the correct URL.

yuqizhou77 commented 5 months ago

@connor4312 I have tried the nightly build and found the issue as mentioned above. Could you help take a look? If you prefer to open this as a new issue for the nightly version, please let me know

connor4312 commented 4 months ago

You can adjust the timeout value in your launch.json to give you additional time. That timeout controls how long it waits to try to find a debuggable page, which is longer when you're having to sign in

yuqizhou77 commented 4 months ago

I think the issue is not about timeout but the edge page. I was not able to make any click on the profile showed in the dialog. Only workaround I found for now is click "Add profile" and then click "switch". I could always repro this on a new machine, a VM for example.