Skip to content

Commit 83a30b4

Browse files
committed
Added some instructions on how to debug broken compiles with hlp_trycompile.
1 parent 5c0daa3 commit 83a30b4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

code/helpers/hlp_trycompile.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@
174174
% % like before, this time specifying some custom #define's
175175
% hlp_trycompile('Directory','/Extern/MySources','Defines',{'DEBUG','MAX=((a)>(b)?(a):(b))'});
176176
%
177+
% Debugging broken compiles:
178+
% To debug a broken compilation, you can switch on the 'Verbose' flag, which will show the output;
179+
% if you are debugging automatic compilation of a BCILAB dependendency, you can add Verbose=true;
180+
% to the env_compile.m file and reload the toolbox, or you can manually call hlp_trycompile as in:
181+
% hlp_trycompile('Directory',<<path-to-dependency>>,'Style','force','Verbose',true, <<any-settings-from-env_compile.m-as-name-value-pairs>>)
182+
% The stream of outputs can be a bit confusing and doesn't show all error messages, so you may
183+
% have to also put a breakpoint at the place in the code where it says PUT BREAKPOINT HERE, and
184+
% then manually invoke the next doeval() statement that it encounters in the console.
177185
%
178186
% Use cases:
179187
% 1) In addition to a source file mysvd.c (compiling into mysvd.mex*), a stub .m file of the same
@@ -684,7 +692,7 @@
684692
fprintf('\n\nTo proceed normally, type "dbcont".\n');
685693
keyboard;
686694
end
687-
if has_largearrays
695+
if has_largearrays % PUT BREAKPOINT HERE
688696
try
689697
% -largeArrayDims enabled
690698
try

0 commit comments

Comments
 (0)