microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

Malfunction of Makefile Tools Extension Depending on the Selected Terminal #554

Open JAVIERDET opened 5 months ago

JAVIERDET commented 5 months ago

Hi, I've been trying to run my C project on a Linux (Ubuntu) machine, but I've been encountering problems. After setting all the parameters (make path, makefile path, launch target, etc.), I press the build, debug, or run button, and I encounter a problem: the task begins but never ends. Indeed, it does nothing; it goes on like in the image (forever): image

When this happens I have the setting set as this: image

But if I change to the "null" one: image

Then it works properly. And I can do any "task" I select, for example cleaning the project:

image

Before knowing that this was the cause of the malfunction. I've tried a variety of different things:

  1. First, I tested whether the problem was with the makefile. It wasn't, because the 'make' command works well when executed directly through the terminal.
  2. Then I made all possible modifications in my settings.json file.
  3. I also tried using a launch.json file and a task.json file for debugging and running the project directly using them (It did not work. BUT IF I CHANGE THE TERMINAL, THEY WORK PROPERLY TOO).
  4. I've also made modifications in the make path and makefile path to see if that was the problem, but it wasn't.

So now, I know how to solve it but I do not know why it is happening. I've looked through the PATH environment variables using both terminals and they are the same. So maybe, since the PATH and other environment variables don’t seem to differ, the issue might be related to how the Makefile Tools extension interacts with the shell or the integrated terminal itself, rather than the environment variables. Is this what is happening? Many thanks in advance.

gcampbell-msft commented 5 months ago

@JAVIERDET Thanks for posting this issue. We have a couple of known issues with this feature where people select different terminals other than the default. This is due to some missing functionality in our extension, as well as there being various different points of direction from the docs about which field we should be primarily looking at for this setting.

I'll mark it as a bug and track it along with the other bugs related to this: #540, #493, #481, etc. Thanks.