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

use getConfiguration launch to read debug config #1261

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Jul 25, 2024

Description

Read launch.json configuration using vscode.workspace.getConfiguration instead to avoid trail comma issues. Add initialBreakpoint as launch.json argument to define initial breakpoint to set in default initCommands.

Fixes #1253
Fixes #1259

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

Say you have a launch.json with trailing comma like this:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "gdbtarget",
      "request": "attach",
      "name": "Eclipse CDT GDB Adapter",
    }
  ]
}

If you click the debug button in the status bar ESP-IDF: Debug it was not working. With this PR, it should work now.

When you start a debug session, the program will stop by default in app_main. If you want it NOT to stop at app_main you should set:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "gdbtarget",
      "request": "attach",
      "name": "Eclipse CDT GDB Adapter",
      "initialBreakpoint": ""
    }
  ]
}
  • Expected behaviour:

  • Expected output:

How has this been tested?

Manual testing by debugging with status bar debug icon ESP-IDF: Debug any esp-idf project with launch.json as shown before.

Test Configuration:

  • ESP-IDF Version: 5.2.2
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Copy link

github-actions bot commented Jul 25, 2024

Download the artifacts for this pull request:

@brianignacio5 brianignacio5 added this to the v1.8.1 milestone Aug 6, 2024
@AndriiFilippov
Copy link
Collaborator

@brianignacio5 hi !

Tested under:
OS - Windows 11

  1. comma debug issue fixed. able to debug ✅
  2. breakpoint is not set by default. add initialBreakpoint: "app_main" to launch.json to set breakpoint to app_main. wokrs ✅

LGTM 👍

Copy link
Collaborator

@radurentea radurentea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brianignacio5 brianignacio5 merged commit 81dea08 into master Aug 9, 2024
6 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/status-debug-button branch August 9, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants