TclProDebug icon indicating copy to clipboard operation
TclProDebug copied to clipboard

Debugger cancels rename, but error does not reach user.

Open budden opened this issue 1 year ago • 6 comments

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"
	}

budden avatar Nov 07 '24 10:11 budden

Can you submit a pull request for this change?

bovine avatar Nov 07 '24 14:11 bovine

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

bovine avatar Nov 07 '24 14:11 bovine

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

bovine avatar Nov 07 '24 14:11 bovine

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: @.***>

budden avatar Nov 07 '24 22:11 budden

I've moved my fork (apnadkarni/TclProDebug) to the tcltk-depot organization that provides a central place for packages that are not actively maintained. Hopefully, they can be collectively maintained there by the community at large.

@budden, are you able to create pull requests? If not, I'll integrate your changes from your tvoygit.ru repository.

apnadkarni avatar Jul 21 '25 07:07 apnadkarni

I have merged two of the patches from @budden into https://github.com/tcltk-depot/TclProDebug. Moreover, that repository is now "retired" as the components have been separate into tcl-parser and tcl-debugger.

See the tcl-debugger README for changes.

apnadkarni avatar Jul 29 '25 15:07 apnadkarni