Colby-CPU-Sim / CPUSim

GNU General Public License v3.0
52 stars 18 forks source link

Breakpoints cannot be added at program runtime #79

Open moirage opened 7 years ago

moirage commented 7 years ago

Breakpoints are added to RAM when the program is loaded. It would be nice to be able to add breakpoints dynamically while the program is running. But what if the program is edited while the program is running? Then the breakpoints don’t match the assembled code in RAM. So do we need to disable text editing and toggling break points during debug mode?

djskrien commented 7 years ago

One way to handle this problem is to have the text area and its left margin become read-only as soon as the user enters debug mode. We could indicate this with some icon and beep if the user tries to edit the text area. Alternatively, we could just do like Intellij IDEA and let the user modify the code and break points and leave it to the user to deal with the confusion that results.