# How can i debug with vs2017 after hot reload

**URL:** <https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** debug, unreal-engine, editor, CPP, question, hot-reload\
**Created:** [May 29, 2018, 10:08am UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183 "2018-05-29T10:08:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lizhi0086](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lizhi0086](https://forums.unrealengine.com/u/lizhi0086)\
**Post date:** [May 29, 2018, 10:08am UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/1 "2018-05-29T10:08:32Z")

</div>

Hi,

I have a problem.  
When i launch the ue4-editor from vs2017, the debugger works fine. Then i make some changes and build it. The ue4-editor will detect some dlls changed and hot reload them. And then i use vs2017 “debug\attach to process…” menu to debug ue4-editor, the breakpoints can not work. I don’t want to restart the editor. How can i do it?

Thanks.

---

<div class="post-metadata">

**Author:** ![phil\_me\_up](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil\_me\_up](https://forums.unrealengine.com/u/phil_me_up)\
**Post date:** [May 29, 2018, 10:30am UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/2 "2018-05-29T10:30:21Z")

</div>

I generally find it easier to close the editor and then build run the process from VS. It takes longer but you get better results.

However, if you want to try not restarting the editor then there is a way:

- Place / Enable your breakpoint
- Right Click on it and select ‘Conditions’
- There is a ‘Location’ section at the top of the popup which appears which will end in ‘Must Match Source’. Click on the text
- Tick the box labelled ‘Allow the source code to be different from the original’

I get mixed results from this. It’s find in some cases, other times it leads to false results but that’s just the nature of it.

---

<div class="post-metadata">

**Author:** ![lizhi0086](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lizhi0086](https://forums.unrealengine.com/u/lizhi0086)\
**Post date:** [May 30, 2018, 2:48am UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/3 "2018-05-30T02:48:38Z")

</div>

Yes, if you select “Allow the source code to be different from the original” option, the breakpoints become solid but have no effect.

---

<div class="post-metadata">

**Author:** ![lizhi0086](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lizhi0086](https://forums.unrealengine.com/u/lizhi0086)\
**Post date:** [May 30, 2018, 8:53am UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/4 "2018-05-30T08:53:15Z")

</div>

I checked again, ue4-editor load new dll after hot reload, and keep reference of old dlls. It’s ok, but sometimes vs2017 can not load new dll module(can not find new dll module in module window), so pdb is a wrong version.

---

<div class="post-metadata">

**Author:** ![phil\_me\_up](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil\_me\_up](https://forums.unrealengine.com/u/phil_me_up)\
**Post date:** [May 30, 2018, 9:36pm UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/5 "2018-05-30T21:36:03Z")

</div>

Ah, in which case you might be out of luck and need to reload the editor. Before you do that though, it’s worth checking your code and making sure that these breakpoints would actually get hit. It might be worth putting in some breakpoints higher up the callstack and then following it through just to be sure.

---

<div class="post-metadata">

**Author:** ![Yata](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yata](https://forums.unrealengine.com/u/Yata)\
**Post date:** [January 31, 2020, 4:12pm UTC](https://forums.unrealengine.com/t/how-can-i-debug-with-vs2017-after-hot-reload/426183/6 "2020-01-31T16:12:11Z")

</div>

Ok, I found the trick, that is because of bug in Visual Studio. That one [Visual Studio Feedback](https://developercommunity.visualstudio.com/content/problem/608689/visual-studio-does-not-detect-a-dynamic-dll-that-h.html?inRegister=true)

So, in order to debug work you need to execute Hot Reload after visual studio debugger is attached.  
One simple way I found - is to compile code, while game is running. Then attach a debugger, then stop a game - hot reload will trigger and breakpoints will work.
