How can I debug a simulink C caller block in Visual Studio?
이전 댓글 표시
I have a model with some c caller blocks.. I am using Visual Studio 2017 -- How can I generated the debug symbols and ultimately used the VS debugger to set breakpointe
댓글 수: 1
Asvin Kumar
2020년 4월 29일
Quick search: A Different ML Answers Question
Let me know if this helps.
답변 (1개)
David Balbuena
2022년 4월 12일
0 개 추천
In R2022a, a new feature was introduced to make it easy to debug custom code. You can refer to this page: https://www.mathworks.com/help/simulink/ug/debug-custom-code.html
If you are still in a release before R2022a, it is possible to debug in Visual Studio, but the workflow is not as straightforward. For instructions on how to do that, refer to the documentation for your specific release. For example, here are the instructions for R2021b: https://www.mathworks.com/help/releases/R2021b/simulink/ug/integrate-ccode-ccaller.html#mw_d8fef0fd-6efd-471c-84c1-5ef9ddaf65a2
댓글 수: 3
Pablo Lozano
2022년 5월 27일
Hi,
I have tried debug a ccaller block with R2022a and VS2022, but when the debugger starts to open, i got the following error
"Error occurred when launching external debugger.
Caused by: Call to service method "attach" failed.
Message: Excepción de HRESULT: 0x8971001E
Source: msvcservice
HelpLink: None"
Some times it "works" supossedly because this error does not shows up, but then in VS there is no code to put breakpoints. Am I missing something?
I have the correct compiler attached to matlab, using "Microsoft visual C++ 2022 (C)".
Any help is very welcome
JulianSTABL
2022년 6월 3일
I am experiencing the exact same error and would appreciate very much any hint to solve it.
Nils van Oijen
2022년 6월 20일
I had the same error, deinstalling other languages and setting Visual Studio to only English solved the problem for me.
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!