-
Notifications
You must be signed in to change notification settings - Fork 10
Debug Test Case
To debug a program, you should use an existing vscode extension that provides debugging functionalities for your current language. Since it is expected that programs reads from standard input, you should add to the configuration the file you want to read from. acmX provides a way to select this test case easily.
- Install CodeLLDB
- Download custom launch.json and tasks.json
- Create folder
.vscode
in your current problem/contest workspace and copy those file there.
Make sure you use your preferred compilation line in tasks.json
. It is important that main solution is compiled with debug enabled, to this pass flag -g
or --debug
.
To add launch.json
and tasks.json
automatically to all the new problem and contests workspace you can add them as a template:
- Copy
launch.json
andtasks.json
to a common place (for example):
~/.acmx/templates/launch.json
~/.acmx/templates/tasks.json
- Open User Settings and modify
"acmx.configuration.launch"
and"acmx.configuration.tasks"
to point respectively to each file.
From now on they will be added on every workspace you create from acmX.
- Right click on the file
testname.in
- Click in
Select Test Case
This will change the "stdio"
entry at launch.json
.
Note: Current implementation uses regular expression so it is not supported at the moment selecting a test case automatically for general launch.json
, but you should be able to edit it manually.
Check for current debuggers extensions at the marketplace
acmX 2020 Post any error or question in the main issue tracker or join Telegram group