Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Setting break point for particular condition in the subroutine

by LanX (Canon)
on Mar 07, 2013 at 08:22 UTC ( #1022168=note: print w/ replies, xml ) Need Help??


in reply to Setting break point for particular condition in the subroutine

> I tried to set as b Engine::_Execute /INITIAL/i but my script runs without wait.

you're setting a breakpoint on the routine with a condition which checks $_ which doesn't make much sense.

If I where you I would set the breakpoint at first line of body of if($cmd =~ /INITIAL/i) condition, that is unless (fork)

There is more than one way to do it.

Find the line number by investigating the routine with l Engine::_Execute and set b line_number.

Or manipulate your source and include $DB::single=1 before the line you want to break.

Cheers Rolf


Comment on Re: Setting break point for particular condition in the subroutine
Select or Download Code
Re^2: Setting break point for particular condition in the subroutine
by srlbharu (Acolyte) on Mar 07, 2013 at 13:08 UTC

    Sorry for not mentioned. I tried $DB::single=1 and I am able to set the break point at the required place. Thanks..

Re^2: Setting break point for particular condition in the subroutine
by srlbharu (Acolyte) on Mar 07, 2013 at 13:48 UTC

    I am getting the below error only when I try to create child process using fork in the code mentioned in this Thread.

    Engine::_Execute(..\..\perl\modules/Engine.pm:122): 122: unless (fork) { DB<1> s Bizarre SvTYPE [37] at ..\..\perl\modules/Engine.pm line 122. Engine::_Execute(C:/Perl/lib/Carp.pm:97): 97: { local $@; require Carp::Heavy; } # XXX fix require to not clea +r $@?

    It means there are some localized scalar variables are trying to restore in a child process hence throwing error

    "Attempt to free unreferenced scalar"

    There is some modules where carp.pm is used. I replaced all the places of carp with warn and tried but no luck still it is showing the same. Please let me know how to debug this issue.

      No idea, better start a new thread: "Forking Problem: Attempt to free unreferenced scalar" to attract the experts.

      One tip: Following the local markup conventions using <p> instead of <pre> will help in gaining acceptance and finding support. =)

      Cheers Rolf

      Please, do not use <pre> tags for text. Read <pre> Versus <code> Tags for more information as already advised in a /msg.
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-12-20 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls