# Fail to Run Slicer.sln in debug mode

**URL:** <https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224>\
**Category:** Support\
**Created:** [April 21, 2020, 10:17am UTC](https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224 "2020-04-21T10:17:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobidk](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kobidk](https://discourse.slicer.org/u/kobidk)\
**Post date:** [April 21, 2020, 10:17am UTC](https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224/1 "2020-04-21T10:17:59Z")

</div>

Operating system:Windows 10  
Slicer version:4.10.  
Expected behavior: Loading the Slicer App using Slicer.slh in debug mode  
Actual behavior: Fails to load some Dlls files integrated into the Slicer project.

I’m trying to run slicer.sln (Start Debugging) after building it successfully for debug mode. I get the following errors.

 ![ErrorRunDebug_Slicer_sln](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/d/cdfe85cff6caeffc6182690b5c30d8a9778407bd.png)

It seems to me that the project doesn’t copy the dependency projects DLLs in the Slicer.sln into the folder Slicer-build\bin\debug.  
Do I need to copy **manually** all these the projects dlls in that are included in the Slicer.slh to the Slicer-build\bin\debug? or I missed something in the project definition/options.

In addition -  
When I run the Slicer.exe directly outside the Slicer.sln It runs but I get the following error.

 ![SlicerInitialLoadGUI](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/5/15274e5d30027cef8329cea6b0d23bd17e142d51.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 21, 2020, 10:30am UTC](https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224/2 "2020-04-21T10:30:57Z")

</div>

You need to start Visual Studio using the launcher like this:  
`.\S4D\Slicer-build\Slicer.exe --VisualStudio --launcher-no-splash`

See more information about debugging here: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Debug\_Instructions#Using\_Visual\_Studio](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Debug_Instructions#Using_Visual_Studio)

---

<div class="post-metadata">

**Author:** ![kobidk](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kobidk](https://discourse.slicer.org/u/kobidk)\
**Post date:** [April 22, 2020, 7:30am UTC](https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224/3 "2020-04-22T07:30:06Z")

</div>

Thanks. It’s working. I wonder why we need to work in that way?  
Could you please refer to my second question regarding python error that appears in the command line.  
Thanks  
Kobi

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 22, 2020, 8:56am UTC](https://discourse.slicer.org/t/fail-to-run-slicer-sln-in-debug-mode/11224/4 "2020-04-22T08:56:02Z")

</div>

When starting the latest Slicer version, there are no python errors. If you use any custom modules that may be the reason. If you use an older version of Slicer, then please try the latest.
