-
Notifications
You must be signed in to change notification settings - Fork 312
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
Debugger problem with project configuration added (VSC-1512) #1334
Comments
Extra notices: Start/Stop OpenOCD Server command from ESP-IDF menu returns:
Ignoring the fact that OPENOCD_SCRIPTS alredy defined in Settings>Extensions>ESP-IDF>Custom extra vars to proper path UPD: this issue may be fixed with adding parameter in env list in project configurations, but originally I suppose VSC project configurations json parameters as additionals but not instead of predefined 🥳 with env list defined Im not managed to reproduce error any more, debug session starts each time. But, the root issue is esp_idf_project_configuration.json env entry overrides some environment variables and makes OPENOCD_SCRIPTS undefined. What also helps - is to remove env entry from esp_idf_project_configuration.json at all - then it not overrides environment and works as well. So looks like it is just UX issue - default esp_idf_project_configuration.json must contains some reference to global variables and overrides them either contains empty env and not ovverides but append env entry values. |
Thank you for your issue. Will take a look at it! Is your environment using the network port You can try updating launch.json like this: {
"version": "0.2.0",
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter",
"debugPort": ###
}
]
} and replace ### for a different server port. I'll test the project configuration example you mentioned. Your settings shouldn't affect the debug experience but I'll take a look see if we missed something. |
Could you please try with the current master vsix installer link here ? I've tried using esp32s3 devkitc-1 with the same project configuration you use in a blink ESP-IDF v5.4 example. I didn't observe the issue you posted (cannot read properties of null). We've might have fixed it in master already. |
You are right. VSIX from master works brilliant. |
OS
Windows
Operating System version
Windows 10 Pro
Visual Studio Code version
1.8.0 (with hotfix from here #1283)
ESP-IDF version
5.1.4
Python version
Python 3.11.2
Doctor command output
DOCTOR_output.txt
Extension
extensionLOG.txt
Description
I have a project for ESP32S3 with Project Configurations added. And as soon as configurations were added - JTAG Debug failed to launch (debug via ESP32S3 built in USB JTAG).
So I made some workaround, based on clear HelloWorld example - there are two projects in attached archive - hello_world and hello_world_no_config. Second one works great, so Im sure thar hardware and environment are Ok and able to debug via ESP32S3 built in USB JTAG, but project with configuration - not managed to start debug session.
IDF_HelloWorld_JTAG.zip
hello_world_no_config - works properly.
compile, download (via UART), monitor - ok. debug - ok, connected and waiting on void app_main(void) entry point. Here is reference OUTPUT log:
proper_OUTPUT.txt
hello_world - no debug session starts.
As soon as project config added (at least one) via ESP-IDF Open Project configuration wizard debug stops working.
Here is esp_idf_project_configuration.json (also in attached projects):
So, after compile, download (via UART) and check HelloWorld in Monitoring Device console, calling DEBUG button makes following actions:
Error banner appears
Open OCD server launched and I see restarts of the ESP by the HelloWorld firmware:
But no debug session launched in VSC.
Debug Message
Other Steps to Reproduce
Just for clarification I also made a test with actual varsion of ESP IDF VSC Extension v1.8.1.
Build, Download, Monitor - fine.
Debug - launches OpenOCD and connects Debug session, hurray! Is it really works now!?
Disconnect debug session, select only project configuration exists "config_uno" and make a final try to be sure:
Debug button:
And stops, no luck 💥
Check if OpenOCD launches at all via ESP menu > Start/Stop OpenOCD Server > Start:
Nope ☹.
What else? Debug Menu and start "Launch" debug configuration (second item in launch.json file. It returns just:
As soon Im sure environment is ok (by hello_world_no_config project debug) looks like that project configuraion crushes some references to environment, or some parameters was not set esp_idf_project_configuration.json not takes its default value (PS are there any detailed descrpition of esp_idf_project_configuration.json fields?)
So, Im stuck in that place. The best I have - is to launch OpenOCD server connected to ESP but with no Debug session from VSC side 😥
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: