flightaware / TclProDebug

Upgrade of debugger from classic TclPro to Tcl 8.5+
Other
32 stars 11 forks source link

Debugger cancels rename, but error does not reach user. #6

Open budden opened 1 week ago

budden commented 1 week ago

There is a ban on a rename operation while in debugger while renaming some subset of tcl commands, like puts. My application renames puts, so it was broken by the debugger. But I had no information about the failure until I enabled "stop on all errors". I think it would be reasonable to break unconditionally in this situation, because I think most applications that use rename won't work properly if rename is not executed, and this error should be considered at least very serious, if not fatal.

So in my fork I added a break dialog in this place, so the code fragment now looks like this:

    if {![DbgNub_okToRename $name $level]} {
        puts "cannot rename \"[lindex $args 0]\" in the debugger, your application is likely broken!"
        # this won't stop if we are inside catch or chosen to not stop on errors, so we break
            DbgNub_Break $level error "Who on earth reads this message?" "Debugger limitation: cannot rename \"[lindex $args 0]\" in the debugger" 1 1
        return -code 1 \
            "cannot rename \"[lindex $args 0]\" in the debugger"
    }
bovine commented 1 week ago

Can you submit a pull request for this change?

bovine commented 1 week ago

Sorry, I just saw your explanation about being unable to open PRs in the other issue.

bovine commented 1 week ago

Can you link to the file/location where that change goes?

budden commented 1 week ago

Hi! Maybe this is secure place for hyperlinks. My repo is here:

https://tvoygit.ru/budden/TclProDebug/src/branch/budden-2024-11-07

It is a fork of https://github.com/apnadkarni/TclProDebug which seem to be the only currently active fork or your repo. However I was unable to find "issues" in that repo.

чт, 7 нояб. 2024 г. в 17:38, Jeff Lawson @.***>:

Can you submit a pull request for this change?

— Reply to this email directly, view it on GitHub https://github.com/flightaware/TclProDebug/issues/6#issuecomment-2462399512, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFRBWEJDFD5R5AOM6SF5DZ7N3MZAVCNFSM6AAAAABRK443MWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRSGM4TSNJRGI . You are receiving this because you authored the thread.Message ID: @.***>