acmx icon indicating copy to clipboard operation
acmx copied to clipboard

Setting debugging testcases for generic tools (language)

Open mfornet opened this issue 4 years ago • 3 comments

Right now to modify the current testcase to debug we are modifying the task.json using regular expression which is not really good idea.

From this repository https://github.com/agrawal-d/competitive-programming-helper use a configuration to store the path to the testcase that should be debugged.

Use variable substitution in the task to use that test.

mfornet avatar Apr 13 '20 18:04 mfornet

This will probably work: https://code.visualstudio.com/docs/editor/debugging#_redirect-inputoutput-tofrom-the-debug-target. Just add to the args the testcase file name

Salil03 avatar May 16 '20 19:05 Salil03

Yes, that sound like a good idea, however the scope of this issue is to allow making a tasks.json like:

{
  "name": "launch program that reads a file from stdin",
  "type": "node",
  "request": "launch",
  "program": "program.js",
  "console": "integratedTerminal",
  "args": ["<", "${testcase}.in"]
}

Notice the usage of ${testcase}.

mfornet avatar May 16 '20 21:05 mfornet

Yes and then we can replace ${testcase} with the appropriate file name.

Salil03 avatar May 17 '20 02:05 Salil03