[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-debug-dev] RE: How to call a (local ?) method from a Watch expression
|
> -----Original Message-----
> From: Mike Parfitt
> Sent: 21 November 2003 08:55
> To: 'platform-debug-dev@xxxxxxxxxxx'
> Subject: How to call a (local ?) method from a Watch expression
>
> If this is the wrong forum, please advise - (my first posting)
>
> Within a project I have added a static method which successfully uses the Reflection API to dump (to a file) a formatted print of any given object to a specified (recursive) depth.
>
> When I call it from the java code that executes as a result of an incoming request it works fine, but this requires me to have modified the code ahead of the test to insert the relevant call(s).
>
> What I would like to do, is call it when I am debugging and halted at a checkpoint, or at some subsequent statement that I have stepped to using F5 or F6 etc.
>
> When I put a call into a Watch Expression I get <error(s) during the evaluation> both when the return type is void and when it is a primitive type (int) - I have also tried modifying the number of \ characters after the drive letter in the string defining the file name, but the error(s) remain.
>
> The logic around Watch Expressions must be evaluating expressions on the fly, so I don't understand why it can't execute mine. I can't be the first to try calling a method in my own project from a Watch Expression - perhaps this is inherently unfeasible, or perhaps there is a document that I haven't found that shows how to do it.
>
> So,
>
> Q1) What limitations exist on the evaluation of Watch Expressions ?
> Q1a) is there a document defining them ?
> Q2) Is there a way of finding out what <error(s) during the evaluation> actually means in this (or any other) case ?
> Q3) Is there some way of wrapping the call to allow the Watch Expression parser to accept it ?
> Q4) Would it work if the method was in a seperate .jar file ?
>
> Many Thanks
>
> Mike Parfitt
Mike Parfitt
Developer
JMH Demica Ltd
Crowne House,
56-58 Southwark Street
London
SE1 1UN
Direct: +44 (0) 20 7450 2539
Switchboard: +44 (0) 20 7450 2500
Fax: +44 (0) 20 7407 5825
Web: http://www.jmhdemica.com
This document should only be read by those persons to whom it is
addressed and is not intended to be relied upon by any person
without subsequent written confirmation of its contents. JMH
Demica accepts no liability for the consequences for any person
acting, or refraining from acting, on such information prior to
the receipt by those persons of subsequent written confirmation
(by letter or fax). If you have received this email message in
error, please notify the sender immediately by telephone. Please
also delete the message from your computer. Any form of
reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this email message is
prohibited. The contents of this email message do not
necessarily reflect the opinions of JMH Demica. Citadel is the
registered trademark of JMH Demica. Copyright JMH Demica all
rights reserved.