简体   繁体   中英

Just in Time Debugging in VS2015 - crtexe.c

I am attempting to debug a Microsoft application using VS's Just in-time debugger. At a certain point, I am prompted to locate the crtexe.c file. I cannot seem to locate the file. Any idea how this should be resolved (ie should I be aware of where this file is)? It appears that if I cannot locate this file, I cannot set breakpoints (VS says "You need to find crtexe.c to view the source for the current call stack frame"). Also, just for my own curiosity, what is the purpose of the crtexe.c file?

(It is my first time using the Just in-time debugger and that is why I am slightly clueless regarding crtexe.c etc.)

The header for crtexe.c says:

/***
*crtexe.c - Initialization for console EXE using CRT DLL
*
*       Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
*       This is the actual startup routine for apps linking to the CRT DLL.
*       It calls the user's main routine [w]main() or [w]WinMain after
*       performing C Run-Time Library initialization.

It sounds like you are debugging an application that was built in an older version of Visual Studio. crtexe.c was available in the C Runtime source code included with VC++ 2013 and earlier. (Maybe paid versions only?) For example, with Visual Studio 2013, the file was located in C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\crt\\src\\crtexe.c . I don't see it in Visual Studio 2015, so I suspect it may have been renamed and/or removed as part of the Universal CRT effort.

Therefore, to see the source code to crtexe.c and debug that code, you need to install the version of VC++ that the application was built with.

Having said that, it's unlikely you need that source code. The only reason that you are being asked for the source location is for your convenience viewing that code from the call stack. Typically you can just click Cancel and you'll still be able to see your own code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM