Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to skip coding in debugger?

Former Member

Hi Experts,

Is it possible to skip serveral lines of coding when you're in debugging?

I mean completely skip the coding, not run the coding at all.

Regards,

Aaron

1 ACCEPTED SOLUTION

Former Member

Hello,

It is possible to skip few stmts in the code while debugging. What you can do is, suppose you are at line 2 in the debugger and you want to skip line 3,4,5 and directly go to line 6. Keep the curosor at line 6 and in the menu choose Debugger -> Goto Statement. THen the execution control goes to line 6 without executing line 3,4,5.

Hope this helps!

Regards,

Srilatha

8 REPLIES 8

Former Member
0 Kudos

Hi,

You can set a breakpoint by setting a breakpoint at a function module or a statement to go to the code directly, wherever you want. Check the Menu path Breakpoint > Breakpoint at .

Hope it helps you.

ChrisPaine
Active Contributor
0 Kudos

Yes,

just highlight the line of code you want to go to and then select (from Debugger menu tab) Goto Statement - Shift+F12.

In this way you can jump over sections of code. You have to be using the new design debugger - Setting -> ABAP Editor -> debugging -> New Debugger.

not really a WDA specific question though!

Cheers!

Former Member

Hello,

It is possible to skip few stmts in the code while debugging. What you can do is, suppose you are at line 2 in the debugger and you want to skip line 3,4,5 and directly go to line 6. Keep the curosor at line 6 and in the menu choose Debugger -> Goto Statement. THen the execution control goes to line 6 without executing line 3,4,5.

Hope this helps!

Regards,

Srilatha

Former Member
0 Kudos

Well, I Guess you mean to skip the actual execution of code, Not unless there is a way to comment out the code in debugging. So the the Answer is 'NO'

0 Kudos

Ramesh Kumar Pampapathi, did you read the previous answer from Srilatha? who says yes and explains how to do it (and he's right)

0 Kudos

Chris Paine:

The Debugging --> Goto Statement option is also available in the old debugger. We have it here in release 4.7

.. Craig

0 Kudos

There are two ways to look at this question

1) In debugging, developer wants to skip the lines of code and jump directly to the other lines. Yes, this is possible as mentioned by everyone above. Saves a lot of time and less stress

2) Ramesh says no to the fact that we cannot avoid the processing of any code in debugging. Which is also correct.

Example this code snippet.

l_variable1 = l_variable2 + l_variable3

if l_variable1 GT 0.

do some logic

endif.

During debugging, if i do not want l_variable1 to take the value of l_variable2+l_variable3. This cannot be avoided from

happening.

0 Kudos

Sandeep and Ramesh,

The point 2 can be done as mentioned by srilatha.

I tried it myself. It ignores the actual processing of the lines in between.

Try it yourself and see.

So the answer is YES