Hello,
I higly need to run twister unit tests in debug mode with breakpoints, step by step, spies and other debug tools in vscode. I did not find a way to do so.
Is anybody has an idea to run twister tests in debug mode ?
Many thanks by advance.
Hello,
I higly need to run twister unit tests in debug mode with breakpoints, step by step, spies and other debug tools in vscode. I did not find a way to do so.
Is anybody has an idea to run twister tests in debug mode ?
Many thanks by advance.
Hi,
This might depend on the platform you use. For native_sim it is like a normal west application
west build -b native_sim -p -- -DCONFIG_DEBUG_OPTIMIZATIONS=y
west debug
Best regards,
Dejan
Go it running in debug mode in vscode with such config
{ "name": "Debug test", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder:axi-v7}/twister-out/native_sim_native/host/lib/temp/lib.temp/zephyr/zephyr.exe", "cwd": "${workspaceFolder:axi-v7}/tests/lib/temp", "stopAtEntry": true, },
Go it running in debug mode in vscode with such config
{ "name": "Debug test", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder:axi-v7}/twister-out/native_sim_native/host/lib/temp/lib.temp/zephyr/zephyr.exe", "cwd": "${workspaceFolder:axi-v7}/tests/lib/temp", "stopAtEntry": true, },