This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256079 - [mixeddev] There should be a way to attach native debugger to Java process without stepping into native method
Summary: [mixeddev] There should be a way to attach native debugger to Java process wi...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-21 13:19 UTC by Vladimir Kvashin
Modified: 2016-08-23 01:55 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2015-10-21 13:19:34 UTC
Right now mixed development debugging works only if I step from Java into a native method.

But we all know that most often we know where to set a break, so we set breakpoints needed and start the program.

With mixed development there is not such possibility.

So there should be an easy way to attach native debugger to the java process that is currently debugged. Say, via a menu item on project pane.
Comment 1 Maria Tishkova 2016-08-22 08:12:44 UTC
What I have tried to implement is the scenario where you can attach to the debugged Java project using Editor context menu Mixed Development -> Attach to Java With Native Debugger (as Project menu of Java is subject for agreement, Sessions context menu items for Java debug session are not flexible and hard-coded in Java code). Here are the steps:

1. Start Java debug session (Step Into or stop at breakpoint)
2. Set breakpoint in C/C++ code
3. Use context menu Attach to Java With Native debugger (enabled if current project is debugged) -> Native debugger is attached to Java process, current session is still Java
4. Push Continue in Java code -> as soon as breakpoint is hot Native session will be activated

Small usability issues:

fixed in:

changeset:   300048:bf256b56779d
tag:         tip
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Mon Aug 22 11:09:05 2016 +0300
summary:     fixed bz#256079 - [mixeddev] There should be a way to attach native debugger to Java process without stepping into native method
Comment 2 Quality Engineering 2016-08-23 01:55:36 UTC
Integrated into 'main-silver', will be available in build *201608230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bf256b56779d
User: Maria Dalmatova <mromashova@netbeans.org>
Log: fixed bz#256079 - [mixeddev] There should be a way to attach native debugger to Java process without stepping into native method
What I have tried to implement is the scenario where you can attach to the debugged Java project using Editor context menu Mixed Development -> Attach to Java With Native Debugger (as Project menu of Java is subject for agreement, Sessions context menu items for Java debug session are not flexible and hard-coded in Java code). Here are the steps:

1. Start Java debug session (Step Into or stop at breakpoint)
2. Set breakpoint in C/C++ code
3. Use context menu Attach to Java With Native debugger (enabled if current project is debugged) -> Native debugger is attached to Java process, current session is still Java
4. Push Continue in Java code -> as soon as breakpoint is hot Native session will be activated

Small usability issues:

Disasm window is opened and empty when attaching to java process.