Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: debugging  (Read 3040 times)

0 Members and 1 Guest are viewing this topic.

Jarwulf

  • Newbie
  • *
  • Posts: 37
    • View Profile
debugging
« on: January 03, 2010, 11:37:38 pm »
When I try to start debugging a SFML project it simply exits out without hitting the breakpoints whereas things work fine with a simple console project. Do you have to use the debugging dlls to debug or is there something else wrong? Can I just replace the release dlls or is there some other settings I have to change?

blewisjr

  • Newbie
  • *
  • Posts: 23
    • View Profile
debugging
« Reply #1 on: January 04, 2010, 03:46:07 am »
Yes to get proper debugging symbols you need to use the libs with -d after them.  Which means they are built for debugging.

Jarwulf

  • Newbie
  • *
  • Posts: 37
    • View Profile
debugging
« Reply #2 on: January 04, 2010, 07:14:16 pm »
Quote from: "blewisjr"
Yes to get proper debugging symbols you need to use the libs with -d after them.  Which means they are built for debugging.



My main problem is that the vs2008 debugger goes through a few breakpoints and then simply exits without hitting anything else. But things are fine with a simple console app. I don't think this is caUSED by using release dlls does anyone know what could be wrong?

Code: [Select]
int main()
{
//declare the characters and objects in window


 object *ObjectArray[6];
//Wanderbot Basicbot(950.f,100.f,950.f,100.f);
hero firsthero(1000.f,300.f,1000.f,300.f);
Peacebot Patrolbot(100.f,1900.f,100.f,1900.f);

weapon cpistol;
    collisionmachine collisionmachineinst;
    gameui currentui;
float distancebetweenxmain, distancebetweenymain,unsignedbx,unsignedby;
    sf::Clock Timer;
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");

sf::Vector2f Center(400, 300);
sf::Vector2f HalfSize(400, 300);
sf::View View1(Center, HalfSize);




 //variables needed to run things on main

collisionmachineinst.objectpopulation=5;

//setup background



BREAKPOINT << No breakpoints hit after this


Code: [Select]
sf::Image Background;
    if  (!Background.LoadFromFile("PracticeDeck5test.png"))
       
    {
        std::cerr << "Error : cannot load image.\n";
        return EXIT_FAILURE;
    }

 sf::Sprite BackgroundSprite(Background);
BackgroundSprite.SetPosition(0.f,0.f);


//register objects in collision loop

 ObjectArray[0]=&firsthero;
 //ObjectArray[1]=&Basicbot;
 ObjectArray[1]=&cpistol.bullet[0];
 ObjectArray[2]=&cpistol.bullet[1];
 ObjectArray[3]=&cpistol.bullet[2];
ObjectArray[4]=&Patrolbot;
[/code]

Jarwulf

  • Newbie
  • *
  • Posts: 37
    • View Profile
debugging
« Reply #3 on: January 05, 2010, 11:48:01 pm »
Anyone have an idea? I can use step over to get further in the code but the debugger keeps exiting without hitting all the breakpoints in main or any in other functions.

The program itself doesn't crash when run normally.

 

anything