SFML community forums
General => General discussions => Topic started by: Jarwulf 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?
-
Yes to get proper debugging symbols you need to use the libs with -d after them. Which means they are built for debugging.
-
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?
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
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]
-
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.