Reputation: 47
Basically, I'm coding using C# at school and due to the limitations put in place on my school's network, my built executables are blocked by group policy; "This program is blocked by group policy..."
I have spoken to the administrator at my school, but this problem will be long-term and may be somewhat frustrating, since I will have to code at school, hope that there are as few errors as possible, take the solution home, and see if it works there.
Is there any alternative way to debug my C# programs?
UPDATE: Thanks for all the feedback, I've taken onboard what people have said; my files are on a Network Drive at school, and I have no access to the Local Drive. I suppose testing my files at home isn't too bad a solution, but people have mentioned 'Unit Tests', what exactly does this entail?
Upvotes: 2
Views: 790
Reputation: 15578
Basically, the IDE needs to build the application and produce compiled output as well as debug symbols to be able to debug your code.
Nothing can be done without a compiled output. Debugging works by debug symbols pointing to locations in your source code that match memory locations or function pointers in the executable code, and the IDE using that information to show you what line of code is currently executing and what values variables in scope have.
I wholly agree with and support other answers to use unit testing to test and debug parts of your application.
Upvotes: 1
Reputation: 86729
No, there is no way to debug code without building and running some executable. (trying to work out what a program does without running it is equivalent to the halting problem)
It sounds like your school has a policy that goes something along the lines of "If this program is not on my list of allowed programs then don't run that program", in which case you should be able to run your code by simply building a DLL instead of an executable and getting some other program (such as a unit testing application) to load and run your code for you.
Its worth talking to your administrator first about this first however as if they are happy with you bypassing their security policy in this way then there is no real reason to restrict you from executing arbitrary programs.
Upvotes: 1