microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.65k stars 28.68k forks source link

JS Debugger does not attach to launched Chrome instance #205418

Closed elemental-mind closed 2 months ago

elemental-mind commented 7 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Create a launch.json und use "runtimeExecutable" to specify a third party non Chrome executable
  2. Launch the debugger
  3. The Chrome window will launch with command line arguments passed
  4. The debugger will complain that it can't attach to the launched chrome window

Working: Before the update @1.85.2 BeforeUpdate

Broken: After the update @1.86.2 AfterUpdate

launch.json relevant part

       ...  
       {
            "name": "Debug Open File",
            "request": "launch",
            "runtimeExecutable": "C:\\Program Files (x86)\\VDesk\\VDesk.exe",
            "runtimeArgs": [
                "on:3 run:chrome"
            ],
            "port": 9225,
            "type": "chrome",
            "smartStep": false,
            "url": "http://localhost:5555/${relativeFile}",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "<node_internals>/**",
                "**/node_modules/**",
                "**/@vite/**"
            ],
            "trace": true
        },
        ...

Trace file & further information To understand the screenrecs: The program I use as a middleman is simply launching Chrome in a third windows desktop. VSCode runs on the second desktop. My browser in the first. Hence the jumping left & right.

Normal debugging with a fresh launch.json chrome config not using "runtimeExecutable" works fine, but is a pain to work with.

I recorded a trace and attached it for further information: vscode-debugadapter-dde1c6eb.json.gz

Possibly related issues https://github.com/microsoft/vscode/issues/204784

connor4312 commented 7 months ago

Can you please share the contents / a screenshot of chrome://version in the (failed) debugged browser?

elemental-mind commented 7 months ago

Hey Connor,

thanks for picking this up: Here is the data:

Working chrome://version in 1.85.2:

Google Chrome 121.0.6167.185 (Official Build) (64-bit) (cohort: Stable) Revision 057a8ae7deb3374d0f1b04b36304d236f0136188-refs/branch-heads/6167@{#1818} OS Windows 10 Version 22H2 (Build 19045.4046) JavaScript V8 12.1.285.28 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Command Line "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9225 --flag-switches-begin --flag-switches-end Executable Path C:\Program Files\Google\Chrome\Application\chrome.exe Profile Path C:\Users\magnu\AppData\Local\Google\Chrome\User Data\Default Active Variations 78ce0fb-ca7d8d80 ee61ef4-377be55a 678f6b42-ca7d8d80 be9ac099-ca7d8d80 eddd0d82-a70c653a aba1243e-82d6e34b e18619cd-ca7d8d80 77bc3423-d9dea092 fcd17b66-ca7d8d80 65df225-ca7d8d80 3095aa95-3f4a17df 57d6085b-ca7d8d80 5e26295f-ca7d8d80 521a59ad-f9a43703 728febbe-94acc606 6d3329df-ca7d8d80 67282630-ae612bf8 87ccf3f3-ca7d8d80 82ada734-ca7d8d80 d72cf1f0-9de1b2a9 44666d99-ca7d8d80 7840af09-3f476883 d5186ff7-ca7d8d80 7fc2c6dc-bf95fb92 b2cff759-b2cff759 b8fcd3e2-ca7d8d80 6f55e1a1-377be55a a582a1b8-5ad3f43d 669a7db8-20131bcc 494e2c16-377be55a ce9b8a32-4d2fac87 d92d97b4-ca7d8d80 ae1924b1-2840b4af c5109773-ca7d8d80 f8641830-ca7d8d80 26665953-ca7d8d80 27f750c-ca7d8d80 3c978b59-ca7d8d80 3fd33f16-ca7d8d80 62f811c6-ca7d8d80 6b9250af-ca7d8d80 c272f203-12ede6a2 95a095bd-12ede6a2 bacf219a-ca7d8d80 61c68934-ca7d8d80 8d182722-377be55a 5e3a236d-59e286d0 910af27f-694968cf d4d0c0cb-5ab828e2 7999ec3c-1f8c5973 9d207f38-ca7d8d80 e3cdbca8-ca7d8d80 91c5512e-12ede6a2 dfc2d5d9-28ad44a 2b4e7fda-ce085764 ea90e0df-4ef7d733 6f7fca1d-8fc8fcd7 39f17c85-ef1fc9f7 4bc95f1e-f839f23d 84f2bb65-b6fe5c75 ab1d6da3-377be55a dcceede7-4064e7aa f7b9a9e3-ca7d8d80 2e89c181-377be55a fa33ceb5-2dc8f79c cb87f652-33c3eba5 314a184e-ca7d8d80 da493d3c-ca7d8d80 72bafd3e-ca7d8d80 3ed7dfc4-ca7d8d80 ea9324c5-ca7d8d80 3ed94085-b59f7663 10713630-ca7d8d80 5d1017fe-ca7d8d80 94ea64fd-ca7d8d80 59a12fbe-6ddff54a bb73ab6c-7b676c3b ea23a088-377be55a 8c584bf0-834c8ca7 bff0815b-ca7d8d80 45a2f2f-5958d005 83514069-377be55a 137f6fe-4d2fac87 36c3226a-377be55a b88dc83e-ca7d8d80 4ea303a6-ecbb250e 258151b3-ca7d8d80 5af3ddb7-ca7d8d80 f1efb311-ca7d8d80 d7d493f4-905ae853 f3b6291d-ca7d8d80 a6caa730-ca7d8d80 1edcddf4-659d13d5 278baf51-4fe2a42f c1771bc6-ca7d8d80 c65eafdb-377be55a 3dc7b4fe-377be55a f9be514e-ca7d8d80 5f656ab9-377be55a ea0d881d-ca7d8d80 3f752d-ca7d8d80 1918000d-ca7d8d80 cd1a6113-9abe4278 23226e84-ca7d8d80 3797f84b-ca7d8d80 f43e9210-377be55a ef85228a-377be55a c845dfe2-d0134b67 83d1a239-377be55a ce43899a-377be55a ec637609-ef8c3c9a 4e762e93-ca7d8d80 94f1fa38-ca7d8d80 3fc87288-ca7d8d80 6cfccc3-ca7d8d80 90860314-ca7d8d80 494d8760-52325d43 7b2873c2-78fa69f3 3ac60855-486e2a9c f48c01d3-47234702 63dcb6a3-c61982e5 e706e746-45641d72 f296190c-b7d97d3d 4442aae2-6e597ede f690cf64-a90023b1 ed1d377-e1cc0f14 75f0f0a0-d7f6b13c 710c3f90-4ad60575 e2b18481-92bb99a9 e7e71889-4ad60575 67ca41ce-ca7d8d80 858aa29b-377be55a 510dafd-ca7d8d80 bea4a9c2-ca7d8d80 6d9fdcc0-19615921 5a18fe50-ca7d8d80 542d15b1-377be55a ff1dade5-12ede6a2 f38ef081-ca7d8d80 22baf79f-377be55a dd08905f-f637b7e7 2e21465b-ca7d8d80 6dcf9601-ca7d8d80 c55491ea-4b0b636c a38f69b3-f459c823 3bd26dba-28ad44a 8d549a7a-5fe72c56

Trace file for working debug setup: vscode-debugadapter-052a2e05.json.gz

Broken chrome://version in 1.86.2: Google Chrome 121.0.6167.185 (Official Build) (64-bit) (cohort: Stable) Revision 057a8ae7deb3374d0f1b04b36304d236f0136188-refs/branch-heads/6167@{#1818} OS Windows 10 Version 22H2 (Build 19045.4046) JavaScript V8 12.1.285.28 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Command Line "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9225 --flag-switches-begin --flag-switches-end Executable Path C:\Program Files\Google\Chrome\Application\chrome.exe Profile Path C:\Users\magnu\AppData\Local\Google\Chrome\User Data\Default Active Variations 78ce0fb-ca7d8d80 ee61ef4-377be55a 678f6b42-ca7d8d80 eddd0d82-a70c653a aba1243e-82d6e34b e18619cd-ca7d8d80 77bc3423-d9dea092 fcd17b66-ca7d8d80 65df225-ca7d8d80 3095aa95-3f4a17df 57d6085b-ca7d8d80 5e26295f-ca7d8d80 521a59ad-f9a43703 728febbe-94acc606 6d3329df-ca7d8d80 67282630-ae612bf8 87ccf3f3-ca7d8d80 82ada734-ca7d8d80 d72cf1f0-9de1b2a9 44666d99-ca7d8d80 7840af09-3f476883 d5186ff7-ca7d8d80 7fc2c6dc-bf95fb92 b2cff759-b2cff759 b8fcd3e2-ca7d8d80 6f55e1a1-377be55a a582a1b8-5ad3f43d 669a7db8-20131bcc 494e2c16-377be55a ce9b8a32-4d2fac87 d92d97b4-ca7d8d80 ae1924b1-2840b4af c5109773-ca7d8d80 f8641830-ca7d8d80 26665953-ca7d8d80 27f750c-ca7d8d80 3c978b59-ca7d8d80 3fd33f16-ca7d8d80 62f811c6-ca7d8d80 6b9250af-ca7d8d80 c272f203-12ede6a2 95a095bd-12ede6a2 bacf219a-ca7d8d80 61c68934-ca7d8d80 8d182722-377be55a 5e3a236d-59e286d0 910af27f-694968cf d4d0c0cb-5ab828e2 7999ec3c-1f8c5973 9d207f38-ca7d8d80 e3cdbca8-ca7d8d80 91c5512e-12ede6a2 dfc2d5d9-28ad44a 2b4e7fda-ce085764 ea90e0df-4ef7d733 6f7fca1d-8fc8fcd7 39f17c85-ef1fc9f7 4bc95f1e-f839f23d 84f2bb65-b6fe5c75 ab1d6da3-377be55a dcceede7-4064e7aa f7b9a9e3-ca7d8d80 2e89c181-377be55a fa33ceb5-2dc8f79c cb87f652-33c3eba5 314a184e-ca7d8d80 da493d3c-ca7d8d80 72bafd3e-ca7d8d80 3ed7dfc4-ca7d8d80 ea9324c5-ca7d8d80 3ed94085-b59f7663 10713630-ca7d8d80 5d1017fe-ca7d8d80 94ea64fd-ca7d8d80 59a12fbe-6ddff54a bb73ab6c-7b676c3b ea23a088-377be55a 8c584bf0-834c8ca7 bff0815b-ca7d8d80 45a2f2f-5958d005 83514069-377be55a 137f6fe-4d2fac87 36c3226a-377be55a b88dc83e-ca7d8d80 4ea303a6-ecbb250e 258151b3-ca7d8d80 5af3ddb7-ca7d8d80 f1efb311-ca7d8d80 d7d493f4-905ae853 f3b6291d-ca7d8d80 a6caa730-ca7d8d80 1edcddf4-659d13d5 278baf51-4fe2a42f c1771bc6-ca7d8d80 3dc7b4fe-377be55a f9be514e-ca7d8d80 5f656ab9-377be55a ea0d881d-ca7d8d80 3f752d-ca7d8d80 83ec04b1-46c0ce07 1918000d-ca7d8d80 cd1a6113-9abe4278 23226e84-ca7d8d80 3797f84b-ca7d8d80 f43e9210-377be55a ef85228a-377be55a c845dfe2-d0134b67 83d1a239-377be55a ce43899a-377be55a ec637609-ef8c3c9a 4e762e93-ca7d8d80 94f1fa38-ca7d8d80 3fc87288-ca7d8d80 6cfccc3-ca7d8d80 90860314-ca7d8d80 494d8760-52325d43 7b2873c2-78fa69f3 3ac60855-486e2a9c f48c01d3-47234702 63dcb6a3-c61982e5 e706e746-45641d72 f296190c-b7d97d3d 4442aae2-6e597ede f690cf64-a90023b1 ed1d377-e1cc0f14 75f0f0a0-d7f6b13c 710c3f90-4ad60575 e2b18481-92bb99a9 e7e71889-4ad60575 67ca41ce-ca7d8d80 858aa29b-377be55a 510dafd-ca7d8d80 bea4a9c2-ca7d8d80 6d9fdcc0-19615921 5a18fe50-ca7d8d80 542d15b1-377be55a ff1dade5-12ede6a2 f38ef081-ca7d8d80 22baf79f-377be55a 3906c665-ca7d8d80 dd08905f-f637b7e7 2e21465b-ca7d8d80 6dcf9601-ca7d8d80 c55491ea-4b0b636c a38f69b3-f459c823 3bd26dba-28ad44a 8d549a7a-5fe72c56

Sorry for the missing formatting. I just didn't know what you needed so I pasted everything. If you need more info I am happy to help. Also willing to do a video call with screenshare & remote control if that helps you dig into the issue.

elemental-mind commented 6 months ago

Hey, do you need any more info on this?

elemental-mind commented 6 months ago

Any news on this?

VSCodeTriageBot commented 3 months ago

Hey @connor4312, this issue might need further attention.

@elemental-mind, you can help us out by closing this issue if the problem no longer exists, or adding more information.

VSCodeTriageBot commented 2 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

VSCodeTriageBot commented 2 months ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!