QtCreator debug pause stop at code not assembly

2019-03-04 14:30发布

How can I configure QtCreator so that when I'm debugging and I press pause it would show the code it is currently processing (now it shows assembly). Couldn't find an answer anywhere about this.

I am using Windows 7.

2条回答
做个烂人
2楼-- · 2019-03-04 14:42

I have this problem with Qt Creator 4.2.2 in Ubuntu 16.04. One of the steps can solve your problem:

  1. Try to swith compile mode in the left corner to Debug mode
  2. Try to switch off option Debug->Operate by instruction, when you debugging. But it doesn't work for me.
  3. Try to switch option Tools->Debugger->Set breakpoint using full absolute path.
  4. Try to add your Qt Src path in window Source Path Mapping (Tools->Debugger->Add Qt sources)
  5. Use only ASCII symbols in your 'project' and 'build' directory paths.

After step 5, there was magic and gdb sucess work in src mode.

查看更多
霸刀☆藐视天下
3楼-- · 2019-03-04 14:57

It might not have the sources for the code it is currently executing. It could be in a system DLL, for instance. If you look at the stack trace, you might find a function that it has the source for, but this is not guaranteed -- it could be in a thread for which no source is available at all.

查看更多
登录 后发表回答