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

Added a custom Debug Adapter (VSC-250) #45

Merged
merged 13 commits into from Mar 26, 2020

Conversation

an-dr
Copy link
Contributor

@an-dr an-dr commented Feb 20, 2020

Added support of debugging using DAP-compatible debug adapter

@github-actions github-actions bot changed the title Added a custom Debug Adapter Added a custom Debug Adapter (VSC-250) Feb 20, 2020
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
esp_debug_adapter/README.md Outdated Show resolved Hide resolved
esp_debug_adapter/debug_adapter/cli.py Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
src/test/adapter.test.ts Outdated Show resolved Hide resolved
templates/fibonacci-app/main/CMakeLists.txt Outdated Show resolved Hide resolved
templates/.vscode/settings.json Outdated Show resolved Hide resolved
@pwmb pwmb added the enhancement New feature or request label Feb 21, 2020
@pwmb pwmb added this to the v0.2.0 milestone Feb 21, 2020
@an-dr an-dr force-pushed the feature/debug-adapter branch 2 times, most recently from fa0b5f5 to 7544f14 Compare February 24, 2020 12:13
@an-dr
Copy link
Contributor Author

an-dr commented Feb 24, 2020

@brianignacio5 after rebasing to 0.1.3 I've faced with several issues, need your participation. I will describe them bellow. Thanks!

@an-dr
Copy link
Contributor Author

an-dr commented Feb 24, 2020

If there is no Openocd in the Path - silently do nothing

@an-dr
Copy link
Contributor Author

an-dr commented Feb 24, 2020

While debugging getting

Image 001

and after this debugger ceases to reply to step, continue and other buttons

@an-dr
Copy link
Contributor Author

an-dr commented Feb 24, 2020

Previosly I used ${config:idf.openOcdBin}/${config:idf.openOcdBinWin} and ${config:idf.openOcdScriptsPath}/${config:idf.openOcdScriptsPathWin} to launching adapter manually from tasks.json. Could you advice to which parameters it is better to change them now?

@brianignacio5
Copy link
Collaborator

Hey @an-dr I've just made a PR to your repo with some changes in vscode part.

I took your PR, rebase it to current master in this repo, and add some changes.

Please take a look in an-dr#1

I tried to plug a build and flash before debug (thereby this error on debug) which was working on MacOS but is not working for you or me in Ubuntu. Will remove for now and think about solutions for it later.

With regards to ${config:idf.openOcdScriptsPath}/${config:idf.openOcdScriptsPathWin} we replaced it with ${config:idf.customExtraPaths} as shown in the tasks.json in the mentioned PR.

Let me know further steps.

@an-dr
Copy link
Contributor Author

an-dr commented Feb 25, 2020

@brianignacio5 works now! Testing remained. Can't see if I can do anything to fix this

  <testsuite name="initialize" timestamp="2020-02-25T09:26:38" tests="1" file="c:\esp\github\vscode-esp-idf-extension\d                                  ebug-adapter\out\test\suite\adapter.test.js" time="0.0000" failures="1">
    <testcase name="Debug Adapter Tests initialize should return supported features" time="0.0000" classname="should re                                  turn supported features">
      <failure message="Cannot read property &apos;write&apos; of undefined" type="TypeError"><![CDATA[TypeError: Canno                                  t read property 'write' of undefined
        at EspIdfDebugClient.doSend (c:\esp\github\vscode-esp-idf-extension\debug-adapter\node_modules\vscode-debugadap                                  ter-testsupport\lib\protocolClient.js:46:27)
        at c:\esp\github\vscode-esp-idf-extension\debug-adapter\node_modules\vscode-debugadapter-testsupport\lib\protoc                                  olClient.js:24:18
        at new Promise (<anonymous>)
        at EspIdfDebugClient.send (c:\esp\github\vscode-esp-idf-extension\debug-adapter\node_modules\vscode-debugadapte                                  r-testsupport\lib\protocolClient.js:23:16)
        at EspIdfDebugClient.initializeRequest (c:\esp\github\vscode-esp-idf-extension\debug-adapter\out\test\espIdfDeb                                  ugClient.js:90:21)
        at Object.<anonymous> (c:\esp\github\vscode-esp-idf-extension\debug-adapter\out\test\suite\adapter.test.js:48:3                                  1)
        at Generator.next (<anonymous>)
        at c:\esp\github\vscode-esp-idf-extension\debug-adapter\out\test\suite\adapter.test.js:24:71
        at new Promise (<anonymous>)
        at __awaiter (c:\esp\github\vscode-esp-idf-extension\debug-adapter\out\test\suite\adapter.test.js:20:12)                                                 at Context.<anonymous> (c:\esp\github\vscode-esp-idf-extension\debug-adapter\out\test\suite\adapter.test.js:41:                                  56)
        at processImmediate (internal/timers.js:439:21)]]></failure>
    </testcase>
  </testsuite>

* read Cmakelists file for project name (VSC-248) (espressif#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (espressif#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (espressif#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* removed outdated extension.test.ts

* fix debug adapter unit test

* removed repeated options

* removed redundant requirements.txt

* made `Upload testing.results.log` always executable

* add adapter python reqs checking

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>
* read Cmakelists file for project name (VSC-248) (espressif#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (espressif#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (espressif#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* fix debug adapter unit test

* DA python pkgs check (#3)

* read Cmakelists file for project name (VSC-248) (espressif#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (espressif#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (espressif#48)

* v0.1.4

* Added a custom Debug Adapter

* fix old configs remove build before debug

* removed outdated extension.test.ts

* fix debug adapter unit test

* removed repeated options

* removed redundant requirements.txt

* made `Upload testing.results.log` always executable

* add adapter python reqs checking

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>

* fix merge issues

* log adapter output

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
Co-authored-by: Andrey Gramakov <mail@agramakov.me>
@an-dr
Copy link
Contributor Author

an-dr commented Mar 4, 2020

@brianignacio5 please help with conflicts

@brianignacio5
Copy link
Collaborator

Please check an-dr#5

Fix Espressif master merge conflicts
@an-dr
Copy link
Contributor Author

an-dr commented Mar 10, 2020

@brianignacio5 still exist :(

pygdbmi = "==0.9.0.0"
typing = ">=3.6.6"
xmlrunner = "==1.7.7"
unittest-xml-reporting = "*"
Copy link
Collaborator

@gerekon gerekon Mar 24, 2020

Choose a reason for hiding this comment

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

@an-dr I think we need to clean up debug_backend dependencies. From my point of view, we need to leave here pygdbmi only.

Copy link
Collaborator

Choose a reason for hiding this comment

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

an-dr and others added 2 commits March 24, 2020 12:45
* read Cmakelists file for project name (VSC-248) (espressif#43)

read build project_description json file for project name

* Feature/localization kv val (VSC-226) (VSC-246) (espressif#41)

* add gulp i18n validation and src missing key log

* rm unused i18n field, add unknown field (espressif#48)

* v0.1.4

Co-authored-by: Soumesh Banerjee <soumeshbanerjee@live.com>
@brianignacio5 brianignacio5 merged commit 7178fc8 into espressif:master Mar 26, 2020
@pwmb pwmb modified the milestones: Release Candidate v0.2.0, Release Candidate v0.1.5 Mar 26, 2020
@igrr
Copy link
Member

igrr commented Mar 26, 2020

Yay!

@an-dr an-dr deleted the feature/debug-adapter branch May 18, 2020 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants