Make possible to set smali breakpoints easily #288

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 177 created by Brut.alll on 2011-06-12T13:33:07.000Z:

"As most major IDEs don't allow to set BPs in Whitespace or comments (also IntelliJ IDEA which I use does not allow), I have a suggestion for this that works with IDEA and probably with all IDEs but in IDEA I've tested. Don't make the smali code a block comment, but make it line-comments preceded by a single semicolon. The single semicolon is seen by the IDE and compiler as empty instruction (NOP) and you can set a BP there, at least in IntelliJ IDEA this works even if not inside a method, like it is currently in the files "apktool d -d" produces currently. The "apktool b -d" then has to simply remove the ";//" parts in the beginning of the line like how it probably currently removes the class declaration and block comment before smaliing the code again."

Thanks Björn Kautler for the idea!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by Brut.alll on 2011-06-12T13:41:06.000Z:

Also in the Netbeans you could add a breakpoint in the commented out line using New Breakpoint dialog. Just place a cursor in proper line, hit ctrl+shift+F8 and set breakpoint type to Line.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by Brut.alll on 2011-06-12T13:41:06.000Z:

Also in the Netbeans you could add a breakpoint in the commented out line using New Breakpoint dialog. Just place a cursor in proper line, hit ctrl+shift+F8 and set breakpoint type to Line.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by Brut.alll on 2011-06-12T14:12:31.000Z:

Eclipse is too smart for NOPs. But something like "i=0;//" should work.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by Brut.alll on 2011-06-12T14:12:31.000Z:

Eclipse is too smart for NOPs. But something like "i=0;//" should work.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by vampire0 on 2011-06-12T15:28:31.000Z:

You could also make it configurable by commandline parameter or whatever, with a sane default that works for most IDEs. Just in case someone is using an IDE that the default doesn't work with.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by vampire0 on 2011-06-12T15:28:31.000Z:

You could also make it configurable by commandline parameter or whatever, with a sane default that works for most IDEs. Just in case someone is using an IDE that the default doesn't work with.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by connor.tumbleson on 2013-05-04T20:24:50.000Z:

Brut fixed for 2.0 w/ adjusting prefix support.

-d,--debug Decode in debug mode. Check project page for more info.
--debug-line-prefix Smali line prefix when decoding in debug mode. Default is "a=0;// ".

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2013-05-04T20:24:50.000Z:

Brut fixed for 2.0 w/ adjusting prefix support.

-d,--debug Decode in debug mode. Check project page for more info.
--debug-line-prefix Smali line prefix when decoding in debug mode. Default is "a=0;// ".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment