(individual question from http://stackoverflow.com/questions/4002976/ide-style-program-running )
views:
64answers:
2I dislike this answer. You, as a programmer, should know that all good IDEs have a buttton that does what I want this one to do, so it must be possible.
Supuhstar
2010-10-29 19:04:27
Oh, wow... well, that's quite the edit, there. Nevermind that last comment. Why don't you recommend this?
Supuhstar
2010-10-29 19:05:56
I changed my answer a bit... still though, this is most likely *not* how good IDEs solve it ;)
aioobe
2010-10-29 19:06:29
any idea how they do?
Supuhstar
2010-10-29 19:57:48
No. Eclipse has it's own compiler... that sort of indicates how complicated their solution could be...
aioobe
2010-10-29 20:02:02
A:
- Run the code in a separate JVM. Use debugger interfaces to control that JVM.
- Instrument the byte code of the classes you intend to run. Insert cancellation checks at appropriate places, as well as trapping access to global JVM resources.
The second choice is probably an endless source of annoying bugs.
Darron
2010-10-29 19:34:40