Thread overview
Build every time and cannot debug VD2017
March 26
I just upgraded to visual studio 2017 and reinstalled latest Visual D. When I hit start, the project is built every time rather than building only when changed. This did not happen before as it would only build with a source change. Any ideas?

The build issue is that
test.exe not up to date: link dependency file Win32\Debug DMD\test.lnkdep does not exist

https://forum.dlang.org/post/m2jb43$bbj$1@digitalmars.com



Also, The debugger is not working. It simply runs without ever hitting a breakpoint. Worked fine in VS2015. This only happens with x64 build. x86 does hit the BP. I've tried the three debugger versions.


These issues seem to be related solely to visual studio 2017 as I was using 2015 before with latest Visual D and did not have these problems. Nothing really changed except installing 2017. I guess it might be a compatibility problem but only real issues I have experiences is what I have described above(but these were out of the box issues, I have not used it much to notice any others).

March 26

On 26.03.2017 08:38, StarGrazer wrote:
> I just upgraded to visual studio 2017 and reinstalled latest Visual D.
> When I hit start, the project is built every time rather than building
> only when changed. This did not happen before as it would only build
> with a source change. Any ideas?
>
> The build issue is that
> test.exe not up to date: link dependency file Win32\Debug
> DMD\test.lnkdep does not exist
>
> https://forum.dlang.org/post/m2jb43$bbj$1@digitalmars.com

VS2017 support is still work in progress. I suspect something changed for the tracker tool supplied by VS.

If you don't need perfect dependency tracking you can disable "monitor linker dependencies" in the global options.


>
>
>
> Also, The debugger is not working. It simply runs without ever hitting a
> breakpoint. Worked fine in VS2015. This only happens with x64 build. x86
> does hit the BP. I've tried the three debugger versions.
>
>
> These issues seem to be related solely to visual studio 2017 as I was
> using 2015 before with latest Visual D and did not have these problems.
> Nothing really changed except installing 2017. I guess it might be a
> compatibility problem but only real issues I have experiences is what I
> have described above(but these were out of the box issues, I have not
> used it much to notice any others).
>

Are you using the VS debugger or mago? The latter should not change between VS versions.
March 26
On Sunday, 26 March 2017 at 15:42:33 UTC, Rainer Schuetze wrote:
>
>
> On 26.03.2017 08:38, StarGrazer wrote:
>> I just upgraded to visual studio 2017 and reinstalled latest Visual D.
>> When I hit start, the project is built every time rather than building
>> only when changed. This did not happen before as it would only build
>> with a source change. Any ideas?
>>
>> The build issue is that
>> test.exe not up to date: link dependency file Win32\Debug
>> DMD\test.lnkdep does not exist
>>
>> https://forum.dlang.org/post/m2jb43$bbj$1@digitalmars.com
>
> VS2017 support is still work in progress. I suspect something changed for the tracker tool supplied by VS.
>
> If you don't need perfect dependency tracking you can disable "monitor linker dependencies" in the global options.
>
>

Ok, this solved that problem for now. I guess for more complex projects it could become an issue?

>>
>>
>>
>> Also, The debugger is not working. It simply runs without ever hitting a
>> breakpoint. Worked fine in VS2015. This only happens with x64 build. x86
>> does hit the BP. I've tried the three debugger versions.
>>
>>
>> These issues seem to be related solely to visual studio 2017 as I was
>> using 2015 before with latest Visual D and did not have these problems.
>> Nothing really changed except installing 2017. I guess it might be a
>> compatibility problem but only real issues I have experiences is what I
>> have described above(but these were out of the box issues, I have not
>> used it much to notice any others).
>>
>
> Are you using the VS debugger or mago? The latter should not change between VS versions.

I tried all 3. The BP's are simply not hit in x64. This suggests it is a VS2017 and Visual D issue only for x64. Not sure what the diff would be.

Again, the problem does not persist when going to x86 mode so it is something pretty specific with x64.

Thanks.
April 01

On 26.03.2017 19:47, StarGrazer wrote:
> On Sunday, 26 March 2017 at 15:42:33 UTC, Rainer Schuetze wrote:
>>
>>
>> On 26.03.2017 08:38, StarGrazer wrote:
>>> I just upgraded to visual studio 2017 and reinstalled latest Visual D.
>>> When I hit start, the project is built every time rather than building
>>> only when changed. This did not happen before as it would only build
>>> with a source change. Any ideas?
>>>
>>> The build issue is that
>>> test.exe not up to date: link dependency file Win32\Debug
>>> DMD\test.lnkdep does not exist
>>>
>>> https://forum.dlang.org/post/m2jb43$bbj$1@digitalmars.com
>>
>> VS2017 support is still work in progress. I suspect something changed
>> for the tracker tool supplied by VS.
>>
>> If you don't need perfect dependency tracking you can disable "monitor
>> linker dependencies" in the global options.
>>
>>
>
> Ok, this solved that problem for now. I guess for more complex projects
> it could become an issue?

Explicite linker dependencies (placed on the linker command line by Visual D) should be fine. What will be missing without the tracker are libraries implicitly linked in by pragma(lib,library.lib).


>
>>>
>>>
>>>
>>> Also, The debugger is not working. It simply runs without ever hitting a
>>> breakpoint. Worked fine in VS2015. This only happens with x64 build. x86
>>> does hit the BP. I've tried the three debugger versions.
>>>
>>>
>>> These issues seem to be related solely to visual studio 2017 as I was
>>> using 2015 before with latest Visual D and did not have these problems.
>>> Nothing really changed except installing 2017. I guess it might be a
>>> compatibility problem but only real issues I have experiences is what I
>>> have described above(but these were out of the box issues, I have not
>>> used it much to notice any others).
>>>
>>
>> Are you using the VS debugger or mago? The latter should not change
>> between VS versions.
>
> I tried all 3. The BP's are simply not hit in x64. This suggests it is a
> VS2017 and Visual D issue only for x64. Not sure what the diff would be.
>
> Again, the problem does not persist when going to x86 mode so it is
> something pretty specific with x64.

x86 (without enabling MS-COFF output files) is very different with repect to debug information as dmd outputs OMF object files with debug information that has to go through a converter to be digestible by the VS debugger.

Do the breakpoints fail for any code including "hello world"? This works for all architectures and debuggers for me.