调试Excel加载项时出现问题 [英] Problem with debugging Excel Add-In

查看:288
本文介绍了调试Excel加载项时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个预先存在的相当大的C ++编程项目,该项目最初是作为Excel 2003的Excel加载项编写的(不知道这是否重要!)。解决方案中的特定Excel接口项目实际上是用C#
编写的,但所有其他子项目和实际计算都是用C ++编写的。我设置调试选项:

I'm working on a pre-existing rather big C++ programming project which was originally written as an Excel add-in for Excel 2003 (have no idea if that's significant!). The specific Excel interface project in the solution is actually written in C# but all other sub-projects and actual calculations are in C++. I set the debugging options with:

命令:C:\Program Files(x86)\ Microsoft Office \ Office15 \ EXCEL.EXE

Command: C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE

命令参数:$(TargetPath)

Command Arguments: $(TargetPath)

其中$(TargetPath)就是构建结束的地方,对吗?

where $(TargetPath) is just where the build ends up, right?

好的,好的当我构建并开始调试SEEMS时,我停在第一个断点并开始尝试从那里开始。这是我注意到非常奇怪的行为。我刚刚声明并实例化的变量仍然不是MSVS手表识别的
,而且踩踏似乎跳过代码中的各个行,没有明显的原因。所以最明显的原因是我的.pdb文件与我的源代码不匹配。事实上,这仍然是
我认为是错误的,因为只有我编辑的新行似乎没有在调试会话中执行。但是,我似乎无法让MSVS使用从构建中出来的新创建的.pdb文件!即使我明确
尝试将调试器附加到我知道正在运行我新构建的代码的Excel进程,仍然似乎有一些旧版本的.pdb(或其他任何导致这些奇怪症状的东西)。

Ok, so fine when I've built and start debugging everything SEEMS fine, I stop at the first breakpoint and start trying to step my way from there. This is when I notice really weird behavior. Variables that I've just declared and instantiated are still not recognized by MSVS's watch, and moreover the stepping seems to jump over various lines in the code for no apparent reason. So the most obvious reason for this it seemed to me is that my .pdb file doesn't match my source code. And in fact that is still what I think is wrong because it is only the new lines that I've been editing that don't seem to be executed in the debugging session. However, I don't seem to be able to get MSVS to use the newly created .pdb file which comes out of the build! Even when I explicitly try to attach the debugger to an Excel process which I know is running my newly built code, still it seems to have some old version of the .pdb (or whatever else is causing these strange symptoms).

我意识到我不是一个非常有经验的程序员,在此之前,我主要从事Matlab等数学和数值编程工作,直到现在才用C ++完成小项目。我确定我在上面的问题中使用了一些错误的术语,但是如果有人
对我的问题可能是什么有任何想法,并且想指出我正确的方向,那将非常感激; - ) 

I realize that I'm not a very experienced programmer, before this I mostly worked in math and numerical programming in Matlab etc. done only small projects in C++ until now. I'm sure I'm using some wrong jargon in my above question, but if someone has any idea about what my problem could be and would like to point me in the right direction it would be very well appreciated ;-)  

迫切希望有人可以帮助我摆脱这个漏洞: - / 

With desperate hope that someone can help me out of this hole :-/ 

Skuli

推荐答案

嗨SkuliDoc,

Hi SkuliDoc,


感谢您在MSDN论坛上发帖。

Thank you for posting in the MSDN Forum.


我正试图让一些高级工程师参与这个问题,这需要一些时间。非常感谢您的耐心。

I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.


抱歉给您带来不便,祝您有个愉快的假期!  


最好的问候,

Best Regards,


Terry

Terry


这篇关于调试Excel加载项时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆