[Eeglablist] Can't use breakpoints in EEGLAB?

Ben Cipollini ben.cipollini at gmail.com
Fri Aug 4 12:15:02 PDT 2006


Dr. Kroger,

A similar workaround that also lets you continue execution (inserting errors 
halts execution) is to set MATLAB to stop on warnings (dbstop if warning), 
and then insert a warning into your code.  This would allow you to not only 
query variables, but to step through your code after that warning--just like 
a normal breakpoint.

Hope that helps!

Ben Cipollini
http://sdepl.ucsd.edu/


----- Original Message ----- 
From: "arno" <arno at salk.edu>
To: "Dr James K. Kroger" <jkroger at nmsu.edu>
Cc: <eeglablist at sccn.ucsd.edu>
Sent: Thursday, August 03, 2006 12:51 PM
Subject: Re: [Eeglablist] Can't use breakpoints in EEGLAB?


> Dr James K. Kroger wrote:
>> Hello Arno et al., I want to write some plugins and am trying to trace
>> through EEGLAB operation. I opened eeglab.m, pop_eegthresh.m, and
>> eegthresh.m in the matlab debugger. I set breakpoints in eegthresh.m.
>> Then I ran eeglab.m. The breakpoints (red dots) in eegthresh.m
>> disappeared as soon as the execution began. When the blue eeglab
>> interface came up, I loaded some data, then again set the breakpoints
>> in eegthresh.m. When I executed the menu item reject data epochs/reject
>> extreme values, the breakpoints again disappeared. Thus I can not watch
>> the data structure at
>>
>> sweeps = size(signal(1,:),2)/pnts;
>> signal = reshape(signal(electrodes,:), size(electrodes(:),1), pnts,
>> sweeps);
>>
> The breakpoint might disapear because you are using menu callbacks.
> Being trained with old Matlab versions myself, I rarely set breakpoints
> myself. I just type on the command line "dbstop if error" which tells
> Matlab to stop if there is an error. Then I add an error in the code I
> want to look at (just some random code "asfdsafasdfads"). It is not as
> elegant as setting a breakpoint but it is more predictable.
>> I want to do this so I can understand how the data is structured in
>> your code so I can step through it similarly. You seem not to use the
>> epoch structure (from epoching the data) and I'm confused about how you
>> are working with the data. The tutorial steps through epoching the data
>> for cleaning and some analyses but the code seems not to use the
>> epochs. I may address this in a separate question.
>>
> The data structures are described in the tutorial at
>
> http://www.sccn.ucsd.edu/eeglab/structtut/datastruct.html
>
> along with a whole new (this year) section on scripting at
>
> http://www.sccn.ucsd.edu/eeglab/scripttut/script_tutorial.html
>
> I hope this help. To solve your breakpoint problem, you might want to
> ask a question on the google Matlab group.
>
> Best,
>
> Arno
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to 
> eeglablist-unsubscribe at sccn.ucsd.edu 




More information about the eeglablist mailing list