Re: retrieving line number in case of error - "simple debugger"



Ulrich Schöbel napisał(a):
proc ?# {args} {
  if {[info exists ::tcl_platform(debug)] && $::tcl_platform(debug)} {
    uplevel 1 $args
  }
}

if {[info exists ::tcl_platform(debug)] && $::tcl_platform(debug)} { proc ?# {args} {uplevel 1 $args} } else { proc ?# {args} {} }

This one is much faster in production - I hate removing all those debug statements...

--
WK
.



Relevant Pages

  • Re: DEBUGMSG : output to a file
    ... part of a shutdown without having a debug cable / serial port. ... extern void myLogPrnt(const WCHAR* wszFormat, ... va_start(args, wszFormat); ...
    (microsoft.public.windowsce.embedded)
  • Re: Direct interaction with subprocess - the curse of blocking I/O
    ... Either no comment here or say _why_ it is empty. ... I'd not hide the details of the exception like that. ... if DEBUG: ... print(format_str % (args or kwargs)) ...
    (comp.lang.python)
  • Re: RCR debug
    ... puts if $DEBUG ... <do something incredibly smart with the args;)> ... I much prefer the fine grained control that the 'logging' and 'log4r' ...
    (comp.lang.ruby)
  • Re: any macro-like construct/technique/trick?
    ... doing a no-op call or checking if the callback function doesn't exist. ... def debug_emit(klass, *args): ... if debug: ...
    (comp.lang.python)
  • Re: Commandline Argument Array Help
    ... You can go into the Assembly Properties, and under the DEBUG section, you ... The esiest way I've found of doing Command Line Args is use a module as your ... Public Sub Main) ...
    (microsoft.public.dotnet.languages.vb)