0

I recently switched my IDE from Eclipse to VS Code (OS: Ubuntu). My Cuda program generates several outputs (.dat files). Eclipse creates files in the workspace directory, while VS code puts them into the $HOME directory. How can I change the output path in VS code? I want to generate outputs into the workspace directory.

I put "cwd" and "outFiles" commands in the launch.json, but it did not work.

I appreciate any help you can provide.

M Sh
  • 1
  • I can't help you on this one, but I recommend adding the JSON files to the question so those familiar with VS Code can more easily show you where to make corrections and future askers with a similar problem can better understand the connections between this question and any answers it receives. – user4581301 Mar 09 '22 at 17:29
  • `"cwd": "${workspaceFolder}"` in the launch.json means "run from here". Whether your *program* writes its data files there is entirely dependent on whether it opens and writes data in the current working directory, or gleans its target output location via some other nefarious circumstance. That is a habit of your program itself. As would be your program potentially *switching* to a different working directory at runtime. The point is VSCode can only do so much at launch-time of your application (e.g. what to run, and where to be when you run it). The rest is up to the program. – WhozCraig Mar 09 '22 at 17:39

0 Answers0