# SDL problems during debugging

**URL:** <https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924>\
**Category:** SDL Development\
**Created:** [June 11, 2004, 4:38pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924 "2004-06-11T16:38:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurt\_Blackwell](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@Kurt\_Blackwell](https://discourse.libsdl.org/u/Kurt_Blackwell)\
**Post date:** [June 11, 2004, 4:38pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/1 "2004-06-11T16:38:21Z")

</div>

I’m just starting to learn SDL using OpenGL on Windows, and I find that whenever  
I step a line in the MSVC debugger my mouse and the IDE become horribly jerky  
for about 3-5 seconds. If I break just before SDL\_PollEvent and step over it  
manually, I can (usually) continue without any problems (until the next  
SDL\_PollEvent call). Does anybody have any clue what might be causing this  
(perhaps threads or DirectX?), and what I can do to get SDL to behave?

---

<div class="post-metadata">

**Author:** ![Will\_McGugan](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/will_mcgugan/32/350_2.png) [@Will\_McGugan](https://discourse.libsdl.org/u/Will_McGugan)\
**Post date:** [June 11, 2004, 5:00pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/2 "2004-06-11T17:00:36Z")

</div>

If you set the environment variable SDL\_VIDEODRIVER to ‘windib’, it will fix  
this.

Its in the faq, I was going to post a url, but I cant seem to access it just  
now…

Will McGugan\> -----Original Message-----

> From: [sdl-bounces+will=willmcgugan.com](http://sdl-bounces+will=willmcgugan.com) at [libsdl.org](http://libsdl.org)  
> [mailto:sdl-bounces+[will=willmcgugan.com](http://will=willmcgugan.com) at [libsdl.org](http://libsdl.org)]On Behalf Of Kurt  
> Blackwell  
> Sent: 11 June 2004 17:38  
> To: sdl at [libsdl.org](http://libsdl.org)  
> Subject: [SDL] SDL problems during debugging
> 
> I’m just starting to learn SDL using OpenGL on Windows, and I  
> find that whenever  
> I step a line in the MSVC debugger my mouse and the IDE become  
> horribly jerky  
> for about 3-5 seconds. If I break just before SDL\_PollEvent and  
> step over it  
> manually, I can (usually) continue without any problems (until the next  
> SDL\_PollEvent call). Does anybody have any clue what might be  
> causing this  
> (perhaps threads or DirectX?), and what I can do to get SDL to behave?
> 
> * * *
> 
> SDL mailing list  
> SDL at [libsdl.org](http://libsdl.org)  
> [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)

---

<div class="post-metadata">

**Author:** ![Nick\_Howes](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/n/41988e/32.png) [@Nick\_Howes](https://discourse.libsdl.org/u/Nick_Howes)\
**Post date:** [June 11, 2004, 8:46pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/3 "2004-06-11T20:46:54Z")

</div>

Kurt Blackwell \<kurt blackwell.id.au\> writes:

> I’m just starting to learn SDL using OpenGL on Windows, and I find that  
> whenever  
> I step a line in the MSVC debugger my mouse and the IDE become horribly jerky  
> for about 3-5 seconds. If I break just before SDL\_PollEvent and step over it  
> manually, I can (usually) continue without any problems (until the next  
> SDL\_PollEvent call). Does anybody have any clue what might be causing this  
> (perhaps threads or DirectX?), and what I can do to get SDL to behave?

Apparently, “You need to pass the SDL\_INIT\_NOPARACHUTE flag to your calls to  
SDL\_Init() to make the msvc debugger work. Otherwise the debugger will be  
unable to trace exceptions, and other debugging features like run to cursor  
won’t work.”

If you’ve already done that, then sorry I don’t know.

---

<div class="post-metadata">

**Author:** ![Glenn\_Maynard](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/bcef8e/32.png) [@Glenn\_Maynard](https://discourse.libsdl.org/u/Glenn_Maynard)\
**Post date:** [June 11, 2004, 9:07pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/4 "2004-06-11T21:07:24Z")

</div>

This is a known bug; see:

[Microsoft Learn: Build skills that open doors in your career](http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/directx_cpp/input_tipsetc_6qic.asp)

for a workaround.On Fri, Jun 11, 2004 at 04:38:21PM +0000, Kurt Blackwell wrote:

> I’m just starting to learn SDL using OpenGL on Windows, and I find that whenever  
> I step a line in the MSVC debugger my mouse and the IDE become horribly jerky  
> for about 3-5 seconds. If I break just before SDL\_PollEvent and step over it  
> manually, I can (usually) continue without any problems (until the next  
> SDL\_PollEvent call). Does anybody have any clue what might be causing this  
> (perhaps threads or DirectX?), and what I can do to get SDL to behave?

–  
Glenn Maynard

---

<div class="post-metadata">

**Author:** ![Kurt\_Blackwell](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@Kurt\_Blackwell](https://discourse.libsdl.org/u/Kurt_Blackwell)\
**Post date:** [June 12, 2004, 5:13am UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/5 "2004-06-12T05:13:36Z")

</div>

Glenn Maynard \<g\_sdl [zewt.org](http://zewt.org)\> writes:

> This is a known bug; see:

> **[Microsoft Learn: Build skills that open doors in your career](https://learn.microsoft.com/en-us/)**
>
> Gain technical skills through documentation and training, earn certifications and connect with the community

directx\_cpp/input\_tipsetc\_6qic.asp

> for a workaround.

The DX mouse and keyboard fix seemed to do nothing to help the problem. I added  
SDL\_INIT\_NOPARACHUTE on as well (even though I had no problems setting  
breakpoints before), and that didn’t do anything either. Any other ideas?

---

<div class="post-metadata">

**Author:** ![Kurt\_Blackwell](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/9fc348/32.png) [@Kurt\_Blackwell](https://discourse.libsdl.org/u/Kurt_Blackwell)\
**Post date:** [June 12, 2004, 9:21am UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/6 "2004-06-12T09:21:14Z")

</div>

I just read the FAQ properly (it seemed to be broken yesterday), and I solved my  
problem by setting SDL\_VIDEODRIVER to windib. I feel silly asking asking a  
question that was already answered in the FAQ 🙂

---

<div class="post-metadata">

**Author:** ![Glenn\_Maynard](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/bcef8e/32.png) [@Glenn\_Maynard](https://discourse.libsdl.org/u/Glenn_Maynard)\
**Post date:** [June 12, 2004, 6:33pm UTC](https://discourse.libsdl.org/t/sdl-problems-during-debugging/10924/7 "2004-06-12T18:33:57Z")

</div>

The real reason it’s being “fixed” is probably that “windib” is, in addition  
to using a different graphics API, causing DirectInput to not be used for  
keyboard input.On Sat, Jun 12, 2004 at 09:21:14AM +0000, Kurt Blackwell wrote:

> I just read the FAQ properly (it seemed to be broken yesterday), and I solved my  
> problem by setting SDL\_VIDEODRIVER to windib. I feel silly asking asking a  
> question that was already answered in the FAQ 🙂

–  
Glenn Maynard
