Breakpoint is ignored in OMNeT++4.6 in ubuntu

121 views
Skip to first unread message

liang lin

unread,
Jul 31, 2017, 3:08:31 AM7/31/17
to OMNeT++ Users
Hi guys,

     I used OMNeT++4.6 in ubuntu, and found that breakpoints are unavailiable when debugging. However, I can set the debugger with "stop on startup at main" and it works.
     How can I debug in ubuntu with IDE. As I know, it works in windows. Thanks!

Lin

Michael Kirsche

unread,
Jul 31, 2017, 4:32:26 AM7/31/17
to OMNeT++ Users
Debugging works under both Windows and Linux.
Under Ubuntu, you probably need to install the nemiver package and enable the debugging of non-root processes.
Both steps are described in the OMNeT installation manual.

Older versions of OMNeT and GDB also sometimes had the problem that breakpoints set during a debug session were ignored. Restarting the simulation in debug mode with the breakpoints already set was a workaround for this.

liang lin

unread,
Jul 31, 2017, 7:36:56 AM7/31/17
to OMNeT++ Users
Thank you Michael. 
I have already installed nemiver (but I don't know how to configure nemiver in OMNeT++'s IDE), and "kernel.yama.ptrace_scope" was set as 0. Is any other configuration needed? In the install guide pdf,  how to do for " you want to be able to use OMNeT++ just-in-time debugging (debugger-attach-on-startup and debugger-attach-on-error configuration options)." 
I'm new to OMNeT++ and eclipse. Thanks!


在 2017年7月31日星期一 UTC+8下午4:32:26,Michael Kirsche写道:

Michael Kirsche

unread,
Jul 31, 2017, 11:49:57 AM7/31/17
to OMNeT++ Users
No nothing else, the kernel ptrace will work after a restart.

Did you try to set your breakpoints and then start the debugging session?

liang lin

unread,
Jul 31, 2017, 9:19:14 PM7/31/17
to OMNeT++ Users
Yes. But breakpoints are ignored after the debug starts. Operation like "Run to line" is unavailable too. Is it this a bug? or debugging with GUI is not supported in linux? What i use are Ubuntu16.04 and OMNet++4.6.

在 2017年7月31日星期一 UTC+8下午11:49:57,Michael Kirsche写道:

Michael Kirsche

unread,
Aug 1, 2017, 5:27:32 AM8/1/17
to OMNeT++ Users
No debugging is supported under Linux too, just like I wrote.
Older OMNET versions (prior to v5.1) had an issue with the setting of breakpoints during a debug session, again like I already wrote (https://dev.omnetpp.org/bugs/view.php?id=956).
Either switch to a newer version of OMNeT or set your breakpoints before you start your debug session. "Run to line" is probably not working due to the issue that breakpoints during a running session are ignored.

liang lin

unread,
Aug 1, 2017, 7:50:44 AM8/1/17
to OMNeT++ Users
got it, thanks michael

在 2017年8月1日星期二 UTC+8下午5:27:32,Michael Kirsche写道:

James Lin

unread,
Aug 15, 2017, 10:25:42 PM8/15/17
to omn...@googlegroups.com
I found that, in OMNet++ 4.6 in ubuntu, the debugging can work if I set the breakpoint during the debugging is running. In other words, do not set breakpoints before you press the debug button, otherwise, the breakpoints will be ignored.


Reply all
Reply to author
Forward
0 new messages