• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
laztrezort

DX11
Debugging (managed) DX11

11 posts in this topic

Learning DX11 through SharpDX, but the process is made rather painful by the fact that Visual Express appearently does not support unmanaged debugging.

Are there any workarounds, 3rd party tools, hacks etc. that anyone knows of to get around this, or am I just out of luck unless I bite the bullet and throw down $$$ for a full version of VS?
0

Share this post


Link to post
Share on other sites
[quote name='laztrezort' timestamp='1345004365' post='4969724']
Visual Express appearently does not support unmanaged debugging.
[/quote]

Not sure what you mean by this. I've had no problem setting breakpoints, stepping through code, evaluating memory, callstacks, etc... What problems are you encountering?

Also, which language and version of Visual Studio Express are using - VS 2008, 2010, or 2012? If you can provide more information about the problems you're facing, I'm sure we can find a solution.
0

Share this post


Link to post
Share on other sites
Sorry, to clarify I'm using Visual C# Express 2010 - which does not have the "unmanaged debugging/native code debugging" option available. This means that even if I set the debug mode (using DXcpl.exe) or the Debug flag in the device creation, exceptions (thrown from the unmanaged layer) are not providing useful debug information.
0

Share this post


Link to post
Share on other sites
Hey Shane,

I [url="http://msdn.microsoft.com/en-us/library/tdw0c6sf.aspx"]see what you mean[/url] about not supporting mixed mode debugging. With the DX debug mode enabled, are you still seeing debug output in the output console? what do the exceptions look like that you're receiving?

Also, you may try installing Visual C++ 2010 Express edition. Having both on your machine may give you more options. When an exception is thrown, you may just try attaching with the Visual C++ Native debugger if you can.

And if all else fails, there is [url="http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx"]WinDBG[/url]. It's a difficult, somewhat cumbersome tool to learn to use (especially with managed code as it requires using the SOS extension), but is by far the most powerful debugger in the world. It is in fact the only good way to view the garbage collected heap for your application while running.
1

Share this post


Link to post
Share on other sites
The debug output from Direct3D goes through the system-wide debugging interface, so you can pick it up using the [url="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx"]DebugView[/url] application. Just be sure to create your D3D11 device with the Debug create flag.

[quote]And if all else fails, there is WinDBG. It's a difficult, somewhat cumbersome tool to learn to use (especially with managed code as it requires using the SOS extension), but is by far the most powerful debugger in the world. It is in fact the only good way to view the garbage collected heap for your application while running.[/quote]

Using WinDbg here is overkill, and claiming that it's the "only good way to view the garbage collected heap" is a little ridiculous; there are plenty of excellent tools available that can visualize the GC heap in a much more intuitive fashion than WinDbg. Edited by Mike.Popoloski
0

Share this post


Link to post
Share on other sites
[quote name='JWalsh' timestamp='1345007211' post='4969735']
With the DX debug mode enabled, are you still seeing debug output in the output console? what do the exceptions look like that you're receiving?
[/quote]

The only information it gives it an "HRESULT" value, "DXGI_ERROR_INVALID_CALL: Message Unknown", the rest of the exception data is default or unset. Output also gives no information. I get the stack trace up to the first managed call that produced the exception, of course.

Thanks Mike & JWalsh, I'll try these out and see what I can make work.
1

Share this post


Link to post
Share on other sites
[quote name='Mike.Popoloski' timestamp='1345007515' post='4969736']
Using WinDbg here is overkill, and claiming that it's the "only good way to view the garbage collected heap" is a little ridiculous;
[/quote]

You don't really know if it's overkill. At this point we don't know what exactly he's trying to do. DebugView works great if he's just wanting to see the Debug messages, but if he wants to set breakpoints, step, make changes to memory, etc... he's back to needing a debugger.

My aim was to point out the WinDBG is better at debugging certain problems than Visual Studio (and other tools). It's all about using the right tool for the job. If you're not particularly fond of WinDBG's !DumpHeap or !EEHeap commands, that's cool. You're entitled to think my opinion is ridiculous.

But I say that WinDBG is the only good way because WinDBG has tons of support for working with the heap. Being able to see how much memory is in each generation, where the pages start and end, being able to see how many objects of each type are in the heap (and where), and cross-reference them to see how much memory is being used by each and in total. Additionally, you can evaluate the class table for each type, etc... Heck, you can even investigate the LOH. And that's not to speak of any of WinDBG's other great commands. !Analyze, DumpStack, EEStack, DO, GCRoot, etc... I never feel more in control of the run-time and what it's up to than when using WinDBG. If you know of another tools that gives you that, I'm more than happy to change my perspective.

[quote name='Mike.Popoloski' timestamp='1345007515' post='4969736']
there are plenty of excellent tools available that can visualize the GC heap in a much more intuitive fashion than WinDbg.
[/quote]

I honestly haven't ever seen one, but would love some recommendations. I'm always interested in learning about new tools. Mark's tools are fantastic.
1

Share this post


Link to post
Share on other sites
For now, as I'm just learning the API by trial-and-error, all I'm interested in is seeing the debug information. Tried out DebugView - works great for what I need.

Thanks again for the quick replies.
0

Share this post


Link to post
Share on other sites
[quote name='JWalsh' timestamp='1345009286' post='4969743']
[quote name='Mike.Popoloski' timestamp='1345007515' post='4969736']
Using WinDbg here is overkill, and claiming that it's the "only good way to view the garbage collected heap" is a little ridiculous;
[/quote]

You don't really know if it's overkill. At this point we don't know what exactly he's trying to do. DebugView works great if he's just wanting to see the Debug messages, but if he wants to set breakpoints, step, make changes to memory, etc... he's back to needing a debugger.

My aim was to point out the WinDBG is better at debugging certain problems than Visual Studio (and other tools). It's all about using the right tool for the job. If you're not particularly fond of WinDBG's !DumpHeap or !EEHeap commands, that's cool. You're entitled to think my opinion is ridiculous.

But I say that WinDBG is the only good way because WinDBG has tons of support for working with the heap. Being able to see how much memory is in each generation, where the pages start and end, being able to see how many objects of each type are in the heap (and where), and cross-reference them to see how much memory is being used by each and in total. Additionally, you can evaluate the class table for each type, etc... Heck, you can even investigate the LOH. And that's not to speak of any of WinDBG's other great commands. !Analyze, DumpStack, EEStack, DO, GCRoot, etc... I never feel more in control of the run-time and what it's up to than when using WinDBG. If you know of another tools that gives you that, I'm more than happy to change my perspective.

[quote name='Mike.Popoloski' timestamp='1345007515' post='4969736']
there are plenty of excellent tools available that can visualize the GC heap in a much more intuitive fashion than WinDbg.
[/quote]

I honestly haven't ever seen one, but would love some recommendations. I'm always interested in learning about new tools. Mark's tools are fantastic.
[/quote]

What is this, an advertisement for WinDbg? I know what it does, I don't need you to start throwing random commands at me. I'm glad you get some weird orgasmic glow when using it, but that doesn't mean you should go around claiming it's the *only* tool that's any good. Some people choose tools based on more than the "feel" it gives you.

Suggesting that a beginner who is just trying to learn D3D11 and wants debug spew to drop the Visual Studio debugger in favor of WinDbg is, as I said before, ridiculous. I'm not sure why you think that using DebugView precludes the ability to set breakpoints and step through in Visual Studio, but that's patently wrong.

As for other tools, the CLR memory profiler gives you a comprehensive overview of the GC heap, but to be honest most of that information is rarely ever useful. The primary reason I've found to view the GC heap is tracking down object leaks and their associated retention graphs, and for that the ANTS or jetBrains memory profilers are far more valuable by providing a targeted view without all that extra useless information. If you haven't used any of them, it might be worth it to give them a try.
-5

Share this post


Link to post
Share on other sites
[quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />What is this, an advertisement for WinDbg? I know what it does, I don't need you to start throwing random commands at me.<br />[/quote]

No. It's not an advertisement. It was my validation for why I think WinDbg is the best tool for doing low-level debugging of .NET. It was no more an advertisement than your mentioning ANTS or dotTrace. The commands weren't for you, I wrongly assumed you were an expert at WinDbg and didn't need them. The commands are for any readers who want to research why WinDbg is so powerful.

[quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />I'm glad you get some weird orgasmic glow when using it...<br />[/quote]

It amazes me how, in spite of how small the industry is, people still feel like it makes sense to treat others with disrespect. Rather than being a douche, why not say "interesting... you seem to feel this tool is very powerful, and you work closely with some of the original .NET developers, perhaps there's something I may be missing." But instead, you jump right to "that's ridiculous". I guess your perspective changes with age and experience. /sigh
0

Share this post


Link to post
Share on other sites
[quote name='JWalsh' timestamp='1345054937' post='4969894']
[quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />What is this, an advertisement for WinDbg? I know what it does, I don't need you to start throwing random commands at me.<br />[/quote]

No. It's not an advertisement. It was my validation for why I think WinDbg is the best tool for doing low-level debugging of .NET. It was no more an advertisement than your mentioning ANTS or dotTrace. The commands weren't for you, I wrongly assumed you were an expert at WinDbg and didn't need them. The commands are for any readers who want to research why WinDbg is so powerful.

[quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />I'm glad you get some weird orgasmic glow when using it...<br />[/quote]

It amazes me how, in spite of how small the industry is, people still feel like it makes sense to treat others with disrespect. Rather than being a douche, why not say "interesting... you seem to feel this tool is very powerful, and you work closely with some of the original .NET developers, perhaps there's something I may be missing." But instead, you jump right to "that's ridiculous". I guess your perspective changes with age and experience. /sigh
[/quote]

Wow, you certainly took that the wrong way. I'm sorry I didn't immediately defer to your obvious experience and blatant name-dropping. I thought we were trying to help the OP here, but it seems you were more interested in showing how advanced you are and how many cool connections you have. It amazes me how, in spite of how small the industry is, people still feel like it makes sense to treat others with disrespect. The OP was a beginner who wanted a specific thing (to see D3D debug spew) and you went off on a tangent to satisfy your own ego. I guess your perspective changes with age and experience. /sigh
-6

Share this post


Link to post
Share on other sites
Well it seems this thread has taken an unfortunate turn. [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img] Seeing as the OP has had his question answered, I think it's time to close this one up.
1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Similar Content

    • By YixunLiu
      Hi,
      I have a surface mesh and I want to use a cone to cut a hole on the surface mesh.
      Anybody know a fast method to calculate the intersected boundary of these two geometries?
       
      Thanks.
       
      YL
       
    • By hiya83
      Hi, I tried searching for this but either I failed or couldn't find anything. I know there's D11/D12 interop and there are extensions for GL/D11 (though not very efficient). I was wondering if there's any Vulkan/D11 or Vulkan/D12 interop?
      Thanks!
    • By lonewolff
      Hi Guys,
      I am just wondering if it is possible to acquire the address of the backbuffer if an API (based on DX11) only exposes the 'device' and 'context' pointers?
      Any advice would be greatly appreciated
    • By MarcusAseth
      bool InitDirect3D::Init() { if (!D3DApp::Init()) { return false; } //Additional Initialization //Disable Alt+Enter Fullscreen Toggle shortkey IDXGIFactory* factory; CreateDXGIFactory(__uuidof(IDXGIFactory), reinterpret_cast<void**>(&factory)); factory->MakeWindowAssociation(mhWindow, DXGI_MWA_NO_WINDOW_CHANGES); factory->Release(); return true; }  
      As stated on the title and displayed on the code above, regardless of it Alt+Enter still takes effect...
      I recall something from the book during the swapChain creation, where in order to create it one has to use the same factory used to create the ID3D11Device, therefore I tested and indeed using that same factory indeed it work.
      How is that one particular factory related to my window and how come the MakeWindowAssociation won't take effect with a newly created factory?
      Also what's even the point of being able to create this Factories if they won't work,?(except from that one associated with the ID3D11Device) 
    • By ProfL
      Can anyone recommend a wrapper for Direct3D 11 that is similarly simple to use as SFML? I don't need all the image formats etc. BUT I want a simple way to open a window, allocate a texture, buffer, shader.
  • Popular Now