-
Notifications
You must be signed in to change notification settings - Fork 70
Add debug primitive providing current source location + enclosing function #2133
Copy link
Copy link
Open
Copy link
Labels
C-Moderate EffortShould take a moderate amount of time to address.Should take a moderate amount of time to address.G-CESK machineThis issue has to do with the CESK machine (the Swarm language interpreter).This issue has to do with the CESK machine (the Swarm language interpreter).L-ElaborationElaboration takes typechecked code and manipulates it (inserts extra code, etc.) to be ready to run.Elaboration takes typechecked code and manipulates it (inserts extra code, etc.) to be ready to run.S-Nice to haveThe bug fix or feature would be nice but doesn't currently have much negative impact.The bug fix or feature would be nice but doesn't currently have much negative impact.T-DebuggingInvolves the debugger + related toolsInvolves the debugger + related toolsZ-Developer ExperienceThis issue seeks to make life easier for developers writing Scenarios or other Swarm code.This issue seeks to make life easier for developers writing Scenarios or other Swarm code.Z-FeatureA new feature to be added to the game.A new feature to be added to the game.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-Moderate EffortShould take a moderate amount of time to address.Should take a moderate amount of time to address.G-CESK machineThis issue has to do with the CESK machine (the Swarm language interpreter).This issue has to do with the CESK machine (the Swarm language interpreter).L-ElaborationElaboration takes typechecked code and manipulates it (inserts extra code, etc.) to be ready to run.Elaboration takes typechecked code and manipulates it (inserts extra code, etc.) to be ready to run.S-Nice to haveThe bug fix or feature would be nice but doesn't currently have much negative impact.The bug fix or feature would be nice but doesn't currently have much negative impact.T-DebuggingInvolves the debugger + related toolsInvolves the debugger + related toolsZ-Developer ExperienceThis issue seeks to make life easier for developers writing Scenarios or other Swarm code.This issue seeks to make life easier for developers writing Scenarios or other Swarm code.Z-FeatureA new feature to be added to the game.A new feature to be added to the game.
While developing a scenario, it would be useful for debugging to be able to see which function a system robot is currently "in" as it executes its program.
Sometimes to achieve this I have placed a
say "function_name";at the top of each function in a robot's program (i.e. "printf debugging") to accomplish this. But it would be nice to have an automatic mechanism.I imagine it is feasible:
Termwith the closest "function definition" that contains it.machineand display the function name for the currently focused term in the F2 dialog.