Netduino runs faster when debugging - Netduino 2 (and Netduino 1) - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino runs faster when debugging


Best Answer Cuno, 01 March 2015 - 09:07 PM

I've reported this problem to Microsoft:

https://netmf.codepl...m/workitem/2179

 

They are currently working on fixing a number of issues, hopefully this one will also be addressed.

 

Cuno

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 h3mp

h3mp

    Member

  • Members
  • PipPip
  • 21 posts

Posted 01 March 2015 - 04:22 PM

..just an observation which I dont understand!

 

I have a simple program running at the moment that just reads a sensor and writes the result to a serial port...

every time it goes around the loop it toggles between two LEDs

 

while (true)

{

ToggleTwoLEDs();

ReadSensor();

WriteResultToSerialPort();

}

 

while running in visual studio the loop runs very quickly, when i stop debugging the LEDs toggling reduces to about quarter the speed (according to my eyes)..

 

what is going on?

 

 



#2 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 01 March 2015 - 09:07 PM   Best Answer

I've reported this problem to Microsoft:

https://netmf.codepl...m/workitem/2179

 

They are currently working on fixing a number of issues, hopefully this one will also be addressed.

 

Cuno



#3 h3mp

h3mp

    Member

  • Members
  • PipPip
  • 21 posts

Posted 01 March 2015 - 09:36 PM

so if i remove the debug output it should go back to full speed - i shall try this in the morning..



#4 h3mp

h3mp

    Member

  • Members
  • PipPip
  • 21 posts

Posted 02 March 2015 - 07:55 AM

OK, all fixed now thanks..

 

I just replaced all instances of Debug.Print with a function called "DebugPrint", then i have a global bool i can toggle to compile with the debug output turned off.. now running at full speed:

 

static bool inDebug = false;
 
        public static void DebugPrint(string output)
        {
            if (inDebug)            
                Debug.Print(output);
        }


#5 xmen

xmen

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 17 March 2015 - 03:07 AM

Or just select "Release" configuration. It will auto remove the Debug when building the app.



#6 h3mp

h3mp

    Member

  • Members
  • PipPip
  • 21 posts

Posted 17 March 2015 - 07:57 AM

Or just select "Release" configuration. It will auto remove the Debug when building the app.

 

I'm pretty sure i did that and it did not help






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.