Skip to content
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

VSCode 1.66.0 appears to have broken Native Debug (at least for darwin arm64) #627

Closed
zfields opened this issue Apr 1, 2022 · 5 comments

Comments

@zfields
Copy link

zfields commented Apr 1, 2022

The VSCode team made multiple updates to debugging, and it appears one is incompatible with Native Debug.

Changes:

Experience: No errors are thrown on any of the VSCode windows, and the debugger appears to work momentarily, but it immediately detaches before hitting any breakpoints.

When I revert to VSCode 1.65.2, then everything works as expected.

@PhilippHaefele
Copy link
Contributor

Just to mention it here, because this could also be the reason (depending on the used launch.json settings / debug probe): They updated Electron to V17 and Chromium version.

@zfields I think it's worthy to share your launch.json content (so other people can try to reproduce this)

@haneefdm
Copy link
Collaborator

haneefdm commented Apr 1, 2022

Aaaarg. Not in a good position to debug. Traveling.

But, please do share details on how I can duplicate any issues you are seeing.

@zfields
Copy link
Author

zfields commented Apr 1, 2022

I am using an ESP32 and the ESP-Prog. Here is a repository I followed to get setup.
https://github.com/makercrew/esp_prog_vscode_debug/

Specifically, here is the launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "ESP-Prog Debug",
            "type": "gdb",
            "request": "launch",
            "target": "./build/esp_prog_vscode_debug.elf",
            "cwd": "${workspaceRoot}",
            "env": {
                "PATH": "${config:esp_toolchain_paths}:${env:PATH}"
            },
            "gdbpath": "xtensa-esp32-elf-gdb",
            "preLaunchTask": "Launch OpenOCD GDB Server",
            "autorun": [
                "target extended-remote :3333",
                "mon reset halt",
                "flushregs",
                "thb app_main",
                "c",
                "monitor [target current] configure -event gdb-detach { shutdown }",
            ],
        }
    ]
}

Here is the pre-launch task, from tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Launch OpenOCD GDB Server",
            "type": "shell",
            "isBackground": true,
            "options": {
                "cwd": "${workspaceRoot}",
                "env": {
                    "PATH": "${config:esp_toolchain_paths}:${env:PATH}"
                }
            },
            "command": "openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg",
            "problemMatcher": {
                "pattern": {
                    "regexp": "(Error|Warn) ?: .*",
                    "file": 1,
                    "location": 2,
                    "message": 3
                },
                "background": {
                    "activeOnStart": true,
                    "beginsPattern": "Open On-Chip Debugger.*",
                    "endsPattern": "Info : Listening on port [0-9]{1,5} for gdb connections"
                }
            }
        },
        ...
    ]
}

@haneefdm
Copy link
Collaborator

haneefdm commented Apr 1, 2022

This launch.json does not use our extension. Not even sure which extension handles this. It is unfortunate they used something generic like "type": "gdb". My guess is

https://github.com/espressif/vscode-esp-idf-extension

They may appreciate knowing about this.

@zfields
Copy link
Author

zfields commented Apr 1, 2022

🤦 I'm sorry, I use both your extension, "Cortex-Debug" and "Native Debug" (by Web Freak) almost daily. I got confused, please accept my apologies. I've moved this issue to the correct repository.

@zfields zfields closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants