cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger wont launch

DTovey
Associate II

I've been using the STM32CubeIDE on a Ubuntu system to develop code for our STM32 based device. Up until today everything was working just fine. But today I made some changes to my code, and when I went to launch the debugger to try it out, I get nothing. I click the Debug button in the tool-bar, nothing. If I go to the Menu and select Run->Debug, nothing. Everything else seems to be working (builds work, I can switch perspectives, etc). It just seems that the debugger won't launch. The frustrating part for me is that I can't even find where to look for info. Is there a log file someplace that might have debugger output?

The only thing that I can think of that I might have changed since the last time I ran the debugger is yesterday in installed PyDev (we use python for automated test scripts). That seemed to work fine, but then the debugger stopped, so I uninstalled PyDev (didn't help). I even tried re-installing STM32CubeIDE but still no joy.

Any pointers as to where to look would be greatly appreciated.

/dwight

12 REPLIES 12
Uwe Bonnes
Principal II

Did you perhaps remap the JTAG/SWD pins? Try connewcting under reset. Otherwise, for better error tracing. try to lunch e.g stm32vubeprogrammer from the command line to exclude interoperation problems.

DTovey
Associate II

This seems to be a problem with the IDE. It's acting like the GUI doesn't have anything connected to the debug or run buttons or menu items. I can still talk to the device using pystlink so I know the communications path through the STLink is functional. It just looks like the IDE won't launch the debugger.

/dwight

I'm able to debug now by launching the GDB server from the command line and then using arm-none-eabi-gdb to connect to it and issue commands. I still can't get the IDE debugger to work though. It just doesn't do anything when I click the debug button on the toolbar.

/dwight

DTovey
Associate II

I'm back to looking at this again. I've updated to STM32CubeIDE V1.4.2, and I still can't get the debugger to launch from the IDE. I do see that when I click the debug button that stlink-server will start:

ps aux | grep stlink

shows

stlink-server -p7184

If I launch the ST-Link_gdbserver from the command line and then click the debug button, I do get a pop-up telling me "No ST-LINK detected". That implies that it is trying to talk to the ST-Link directly but the gdbserver that I launched directly already has control of the device so the IDE can't get to it. That tells me that the button is actually connected to something, but the IDE just won't switch to debug mode and take control.

Is there a log file somewhere that might show me what is going on? Something I should be looking at in the debug configuration in the IDE?

/dwight

YIzAKat
Associate II

I can confirm this exact same behaviour with the same cause. I too just installed PyDev to use Python to do some utilities to support the main project. Since then I've been unable to launch the debugger from inside the IDE.

The launch button (even choosing an explicit configuration) just does nothing. No errors. Nada.

It will however show the ST-Link serials if scanned and I can still flash, debug from the command line as per Dwight's comment. It pretty much looks as if the action associated with the launch button has gone, perhaps PyDev intercepted it for its own nefarious purposes 😉

I've removed the PyDev plugin as a first step with no change. I guess I'll try removing and reinstalling the IDE next but it is a bit of a pain.

This is the first plugin I've had a problem with in regards to STM32CubeIDE - all others seem to work with it perfectly so far.

Jason.

YIzAKat
Associate II

For those that might encounter the same problem, unfortunately I didn't find a good solution.

In the end I completely removed the IDE and manually ensured that all configuration associated with it was cleared (I had to wipe out all the .(dot) files in my home directory. I exported my preferences beforehand which went some way to softening the re-installation.

Reinstalling the IDE and the other plugins that I use resolved my problems. Hopefully one of the ST crew will look at this since Python is a fairly common supporting language for tooling, testing and experimentation and having them both in the same workspace is nice.

Like the OP I am running on a Linux (Debian) environment so not sure if this problem also arises on Windows.

:\ Jason

DTovey
Associate II

For what it's worth, I was never able to find a solution with the GUI either. As I mentioned previously, I was able to move on by launching the GDB server and using the gdb CLI, but that was cumbersome. I've now finished that STM32 project and now we are back to using an STM8 for the next control panel, which means that I'm using the Windows-based ST-Developer, which has it's own set of issues. Someday I might have the time to investigate setting up a Linux-based STM8 environment. Given the number of STM8 based projects that we do it would probably be worth the effort.

/dwight

DTovey
Associate II

And FWIW: I've been playing around with an STM32 project on a Nucleo board using the IDE on a Mac OSX system, and I'm getting the same results. Clicking the debug button does absolutely nothing with PyDev installed. So it appears that the issue isn't with Debian at all but is with the IDE. Would be nice if we could get this cleared up.

/dwight

blechleitner
Associate II

Hi,

even it is a quite old thread I am reusing here because today, I walked into the same trap. I am using CubeIDE 1.6.0 (the latest one) and it runs on a Windows 10 system with all updates. Everything went ok until I installed PyDev today. So far the exactly same behaviour as described here happened after that. The only I have seen, when pressing the first time F5, I see Launching <application> (0%) and the small green progrerss bar for a very short time. So this indicates me, that the IDE is reacting on pressing F5. But thats all. I remember, there has been someting, somewhen...

Another detail: To recover from the situation i thought, I have to uninstall PyDev. So i did it. After that, the projects in the affected workspace still could not be debugged but other workspaces are working (not sure if they would, before uninstalling PyDev). Ok, next step, create a new workspace. So I saved the folder .metadata and exported the full preferences of that workspace. Finally I deleted the whole .metadada folder (not touching any project's .settings). The IDE created a new workspace and after importing the existing projects, the debugging started to work again. Good, let's import the preferences. What shall I say, after that debugging disapeared again. Ok, once again recreate the workspace and import the preferences one for one. So I unchecked "Import all" and imported one item after the other (IDE restarted everytime). At the end all 8 items have been imported and debugging is still working. Huh? Ok, import prerferences again with checked "Import all". Debugging disapeared. "Import all" seems to be not the same as "Import all" unchecked but all preferences items checked itself.

After some fiddling around, it turned out that the issue might be a small but a nasty one. The PyDev perspective unchecked the setting Window->Preferences->Run/Debug->Launching->General Options->Build (if required) before launching (has been saved also in my preferences export file). Unrelated to the PyDev issue, when this checkbox is not set, I have the issue, that no debugging session starts at all after a fresh start of the IDE. If I want to have the functionality "no build before launching", I have to check it, start a debug session and uncheck it again. Then I have no issue until next IDE start. This is another issue I had already posted here, unfortunately with no response at all. These two issues are indirectly related as PyDev may change this setting when the Python perspective will open. There is a configuration window when opening the Python perspective with some misleading wording. Read it *exactly*! Finally, I unchecked ALL checkboxes in that window.

Finally, at least for me, it is solved by simply checking "Build before launching" manually. Now debugging works and I can use PyDev in CubeIDE. That's what I want, still have to be tested more deeply. I hope, my experience here will help you guys as well.

I know, this is a community driven forum but I know also, responsible ST employed members are reading here as well. So I (and the community) kindly ask them to have a look on this issue and give us a indication what we can do (or not). The issue was reported a year ago on Linux but definitely happen on Windows 10 as well.

As others already mentioned, Python is the most common language doing a lot of sidework around embedded development and therefore it would be nice to have PyDev available inside the IDE without any hassle.

Best regards,

Bernhard