Discussion about this post

User's avatar
Andrés Alcarraz's avatar

Great thanks, I'm not used to VS Code either, so there are so many pain points, I tried eclipse for this course before, with which I'm more familiar. But didn't know how to configure it for bazel.

Still facing issues, when I debug the program having put this in the launch.json:

```

"program": "${workspaceFolder}/bazel-bin/format/format_test",

```

VS Code then complains that `/workspaces/daily-bite-course-06/format/format_error` does not exist. I'm running it in the container, so I should have the same as you, but can't figure out why it is removing the `bazel-bin` part of the path.

Also, I don't think it's related but, VS Code also complains that it cannot open "catch2/catch_test_macros.hpp: No such file or directory gcc" in the include. When I run it with bazel from the command line it builds and runs OK. So when I try to launch it says gcc could noot compile it.

I know it doesn't need to because bazel generated the runnable. But I also don't know how to make VS Code debug the program because it doesn't find it.

Expand full comment
Andrés Alcarraz's avatar

Yes, I remember something about that, but I couldn't understand it at the moment, and as it said you would talk more about debugging later I just kept going.

Moreover I still can't figure out which is the bazel binary I have to set in the `launch.json`. Never used bazel before. Do I have to modify the `launch.json` for each test?

I guess I should also run the bazel build with debug before, because I don't see the `bazel-bin/debugging` directory in the dist.

I guess with this I have enough to try and make it work, but If you could add a more detailed guide for that it would be easier for other starters.

Thanks.

Expand full comment
12 more comments...

No posts