Not able to debug annotation processor

Until now, I never had to debug javac. Now that I am writing an annotation processor that gets called as part of javac, I felt the need to debug javac. I have still not found a way to do so. I tried passing the standard JVM debug options using -J option, but in vain. If you know how to attach a debugger to javac, please let me know.
Thanks,
Sahoo

Sahoo,
You can use the JSR-199 (IIRC) API to call the compiler programatically, which means you can call the compiler from a unit test, which means you just set a breakpoint in your processor, debug your test and the compiler runs and calls the processor and stops on the break point. Hickory has a package of testing tools. The core class there is Compilation which is a facade to the javax.tools API and an implementation of an in memory file manager. I have used this to have a processor load "files" via the class loader.getResource() mechanism so that should work for you as well.
See https://hickory.dev.java.net/nonav/apidocs/index.html?net/java/dev/hickory/testing/Compilation.html
If you browse the hickory source for the tests you'll find lots of examples.
https://hickory.dev.java.net/source/browse/hickory/trunk/code/test/net/java/dev/hickory/

Similar Messages

  • Getting Error in Asmx Web Service Unit Testing & not able to debug unit-test Project.

    I am getting below error message while running unit test for ASMX web service
    Failed MyFunction The ASP.NET Web application at 'D:\MyProjectFolder' is already configured for testing by another test run. Only one test run at a time can run
    tests in ASP.NET. If there are no other test runs using this Web application, ensure that the Web.config file does not contain an httpModule named HostAdapter.
    I checked in web.config. Below line already added in web.config. i removed below line to run test again but getting same error message.
    <httpModules>
    <add name="HostAdapter" type="Microsoft.VisualStudio.TestTools.HostAdapter.Web.HttpModule, Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </httpModules>
    i am not able to debug unit test project.
    Please "Mark as Answer" if this post answered your question. :)
    Kalpesh Chhatrala | Software Developer | Rajkot | India
    Kalpesh 's Blog
    VFP Form to C#, Vb.Net Conversion Utility

    Hi Kalpesh,
    >>Failed MyFunction The ASP.NET Web application at 'D:\MyProjectFolder' is already configured for testing by another test run. Only one test run at a
    time can run tests in ASP.NET. If there are no other test runs using this Web application, ensure that the Web.config file does not contain an httpModule named HostAdapter.
    In your web application root, can you find a file named 'web.config.backup'?
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/e2ad0c20-df90-48dc-818c-8c5ec24d9365/visual-studio-test-is-not-hitting-breakpoints-in-debug?forum=vststest
    Fang also shared more information about debugging the unit test for web project here:
    https://social.msdn.microsoft.com/Forums/en-US/daa16086-b1b8-4917-ad8d-65e23b49e1bc/not-able-to-read-webconfig-through-unit-test-feature-by-visual-studiovsts?forum=vststest
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Not able to select annotation in Adobe Reader X

    Hi,
    If I hide both toolbar and navigation panel then I am n't able to select annotation in Adobe Reader/Acrobat X.  This wasn't the case with earlier version of Adobe.
    So is this issue of latest Adobe?
    Regards,
    Arvind

    I checked in version 10.0.1 also. I am not able to select annotation with left mouse button click. This happens only when both toolbar and navigation panel are hidden. You can check this at your end.
    And using RMB click, I am able to select annotation.  I think this is an issue of latest Adobe as earlier we were able to select using LMB click even when both toolbar and navigation panel are hidden.
    Regards,
    Arvind

  • Not able to Debug in SMQ1 - CRM MIDDLEWARE

    Hello Experts,
                        There is a failed queue in SMQ1. But we are not able to debug the queue which we were able to do couple of days back. Clicking on the DEBUG icon results in the same error message which we get when we just reprocess it.
    Thanks,
    josh
    Edited by: Laxmi WIPRO on Oct 18, 2010 12:07 PM

    Hi Laxmi,
    Txn. SM59, Browse to ABAP Connections and locate the logical system you need to debug from your CRM system. Eg : Assuming your data is flowing from CRM to ECC whose logical ID is ECCCLNT100, then search for this logical name ECCCLNT100 in the list of connections, double click on it....browse to the 3rd tab "Logon and Security" and edit the user maintained in the Logon area. This user should be a dialog user.
    For an inbound queue SMQ2, all FMs are executed at the CRM itself, so you'll be able to debug them...but for debugging SMQ1 you need to have a dialog user which has an access to the ECC.
    Thanks,
    Rohit

  • Not able to debug procedure using oracle 11g & toad 9.0.1.8

    hi..
    i m using oracle 11g & toad 9.0.1.8 ..i want to debug procedure , i set parameter, but not able to debug procedure , there is 'debug' option, but that option is disable..
    can u plz help me regarding this..
    can u suggest me another tool where i can debug my procedure..
    thanx..
    Edited by: user10502250 on Jun 22, 2009 4:15 AM

    "Help, About" should list the installed options, and "Debugger" should be in the list otherwise you'll need an expensive upgrade or a change of IDE.
    In TOAD you have to open the source code editor, at which point the debugging options should be accessible. You can either set a breakpoint and hit the 'Execute' lightening symbol, or place the cursor at a suitable point in the code and press F12.
    I'm not completely sure how you are supposed to pass runtime parameters but it may be to do with right-click, Action Console, Execute, which brings up a 'Set Parameters' dialog. However this won't run in debug mode, it just runs and remembers the arguments. I don't really get it. As you can probably tell I'm not a great fan of the product. Have you looked at PL/SQL Developer?

  • Not able to debug XSJS service

    Hi,
    I am receiving following error on launching debug configuration:
    "Failed to check if system is secured"
    I believe because of above error i am not able to debug the .xsjs service.
    I am setting Host and Port for debug configuration same as i am using to test service in browser.
    Thanks,
    Rahul

    Hi Steve,
    My problem is resolved but it had nothing to do with privilge or debug configuration.
    I am not sure why your URL looklike IPjdbc:sap://localhost:30015/.
    Your URL should be XSJS service in hana server.
    Are you getting popup for sessionid while launching your XSJS debug configuration?
    Can you please confirm above question and then i might suggest something?
    Thanks,
    Rahul

  • Not able to debug the start routine

    Dear All,
    I am facing a weired situation.
    I have a transformation(DSO -> Cube) with start routine. I am able to debug the routine in Development System.
    I transported the routine to Production System successfuly, but i am not able to debug the start routine there. I have all the necessary authorisations(SAP_ALL, SAP_NEW)
    I am perplexed. Never seen such issue before.
    Can someone help me here?
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 5, 2008 11:16 AM

    Dear Jerry,
    Thanks for writing.
    I followed the instruction, but it didn't work.
    Can there be any technical reason for data package to be empty, even if the source has data(Note: There is no filter in DTP)?
    Also, i just checked with other start routines...I am not able to debugg there also. System is not entering the debug mode.
    Here, the patch level is: 0010. Can this be the villain?
    Please advise.
    Regards,
    Avinash.
    Edited by: Avinash Kumar on Nov 6, 2008 4:26 AM
    Edited by: Avinash Kumar on Nov 6, 2008 4:51 AM

  • Not able to debug the ZDEG(Z OUTPUT) MEDIUM Distribution Ale

    Hi All,
    I am not able to debug the ZDEG output type for Shipment (Medium is Distribution ALE). 
    Executing the VT02n providing the Shipment and selec the GOTO Menu  the Output tab and Select one (EX ZDEG) Output type.  I have kept the break point in the Program RANASTED and Form Routine ALE_PROCESSING.
    Table record in TNAPR table.
    023     ZDEG     A     V7     RSNASTED     ALE_PROCESSING     
    Could you please let me know how to debug this output type code.
    Thanks In Advance.
    Venkata

    Which ERP version that you are using?  If the system is ECC 6.0, then you can activate the session break-point in the print program.  You can also activate form debugging option on using transaction SE71, enter name of the form (ZDEG), from the menu, Utilities->Activate Debugger.  Hope this help you.

  • Not able to debug z program attached to special funtion in processing routi

    Hi,
           I want to debug my z pogram. attached to special funtion in processing routine.but not able to debug But debugger is not passes through that z program if i passes through transaction vl02n.
    Regards,
    Ranu.

    Hi Sharma,
    if the output type  is triggered automatically and sheduled background and creating spool or sending mail.
    then try this way.
    Write the statemnet in your program to debug the program in Background.
    data : w_flag type C.
    do.
    if w_flag = 'X'.
       exit.
    ENDIF.
    enddo.
    and execute the VL02n and go to t-code SM50 and select your program and got to menu >program->program> Debug
    the the program stops in your Zprogram and make the w_flag to 'X' and continue debuggin zprogram.
    Regards,
    prabhudas

  • Not able to debug BBP_GROUP_LOC_PO badi in SRM

    Hi Experts ,
    I am not able to debug the badi BBP_GROUP_LOC_PO .
    I have set the external break points in the BADI .
    Is this geting called in Background? In that case what needs to be done?
    Regards,
    Sunitha

    Sunitha,
    you can debug badi BBP_GROUP_LOC_PO BADI  only after execute the program BBP_SC_TRANSFER_GROUPED.
    Keep the external bp in your Badi implementation and later execute the above program. It will exactly stop the place where you place the BP.

  • Not able to debug package procedure using PL/SQL Developer 7.0.3

    Hi Guys,
    I am debugging one of procedure of my package which is calling many procedure for different package
    I am using PL/SQL Developer 7.0.3., Iam not able to debugger , whenever I run debugger it makes all the dependent package as invalid
    Please advice me what to do,
    Thanks
    Nav

    PL/SQL Developer has it's own forum @http://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=postlist&Board=3&page=1&PHPSESSID=13b3aab3b0281796203ac9eca9db0f82
    You have an old version, by the way, why not upgrade?

  • Not able to Debug LT06 - /h

    Hi all,
    I am not able to run tcode LT06 in debug mode using '/h' when i selet menu item 'display'.
    Can you plz guide why this has happened and how to get into debug mode on menu selection
    Thanks

    Hi,
    Try with /hs and after run the transaction LT06.
    Regards,
    José

  • THrough dynpro i am not able to debug backend function module

    Hi,
    In my scenario i am uploading one file through dynpro application and store it at backend(sap r/3). In this scenario first i copy file from ep application server to r/3 application server and then send file dms server where i store that file. I make function module which copy file from ep application server and send it r/3 application server and further it store it dms server.
    I checked with function module it was working fine in backend but when i am call fm in my application it would not work,
    I could not able to debugg it also.
    Please provide if i miss any thing .
    Regards,
    Gurprit Bhatia

    Have you fulfilled following list:
    1. Enbable remote debugging(external breakpoint) on function module
    2. Use same UserID that enables debugging and used in JCo Connection.
    3. Keep open the SAP GUI screen
    4. Run your application, it will take you to SAP GUI screen when breakpoint found.
    Thats all, hope this will help.
    Jawed Ali
    Edited by: Jawed Ali on Aug 27, 2008 10:42 AM

  • Not able to debug EXIT_SAPLMCS5_002

    Hello
    I want to debug code written in EXIT_SAPLMCS5_002 (INCLUDE ZXMCVU04). I have already added breakpoint in the include ZXMCVU04. But when I run 2LIS_12_VCSCL extractor in RSA3  in delta mode, it  does not take me to this breakpoint.
    I am first time debugging this extractor. Am I missing something ?
    Regards
    Saurabh

    have you changed the datasource in RSA6 - remove the flags from "hide field" and "only in customer exit"?
    Field only is checked only when you need the field in custome exit and not the datasource. I unchecked all the flags in the extract structure try once again.
    Edited by: Rama on Dec 25, 2011 7:00 PM

  • Not ABle to debug ?

    Hello All,
          I'd set the dubug mode on and did the following :-
          1.      Choose Run --> Debug... in the main menu.
           2.      In the list of possible configurations, select Web Dynpro Application and then choose New.
           3.      Under Name, enter MyWelcomeConfig as the name of the configuration.
           4.      Choose Browse... next to the Project field. Next, select the Welcome project and confirm with OK.
           5.      Choose Browse... next to the Web Dynpro Application field. Next, select the WelcomeApplication and confirm with OK.
           6.      If the Welcome application to be debugged has not yet been deployed on the server, select the Create and deploy archive checkbox. 
           7.      To select the server that you want to use for the debugging procedure, choose the J2EE engine tab page.
           8.      The configuration is now complete and you can start the debugger.
           9.      To start the debugger, choose Debug.
    The Debug Properties screen is showing me a message saying :-
    <b>
    [ J2EE Engine ] :The selected server node does not run in restricted load balancing mode !
    Please configure it correctly so that the URL Extension can be used.
    </b>
    Now,  when I pressed Debug button , I'm getting an error saying :-
       404   Not Found
       SAP J2EE Engine/6.40 
       The requested resource does not exist.
    Can any one tell me where the problem lies ?
    Regards,
    Deepu.K

    Hello ,
    <i>In you case (debug) url gets launched but there is no process on server running in debug mode. Hence,you are getting 404 error because the server is not in debug mode either locally or globally.</i>
      My server 0 has the following Properties :-
    Name                               : server0
    State                                :  Running
    Productive Use                  :  NO
    Debug Mode                      : ON
    Restricted Load Balancing  :  NO
    Automatic Restart              :  YES
    Http Port                           :  0
    Debug Port                        : 50021
    AS i see...I guess mz Server is in debug mode.
    Then what could be the problem ?
    Regards,
    Deepu.K

Maybe you are looking for

  • How can I disable iPhoto and use my iPhone / iPad as in Windows?

    I really despise iPhoto and I would like to use my iPhone / iPad just like in Windows where I can drag and drop the photos and videos from my iPhone or iPad as if it's an external hard drive in windows.  iPhoto is the only thing I really truly hate a

  • How do I reduce the file size of a video?

    I need to reduce the size of a video in imovie to 200 MB.  Can anyone help me please?  Thank you.

  • Creative Cloud Desktop App. No apps in window ?

    Hi, CC has been working fine since months but today I've got no apps in the "Apps" list of Adobe CC Desktop App but an error message : Download errror Contact customer support Download CC No answer to this problem on the following page : http://helpx

  • Aperture will not start without Internet

    This question relates to Aperture 3.3.2 The cable company is doing some work on their lines behind my house. As a result my Internet connection has been up and down the past few days. During one of the outages I tried to start Aperture and it wouldn'

  • Error after checking our webdynpro DC from DTR

    We have recently upgraded our JDI to SP 16 including our development and production servers. Now when we create a new DC of webdynpro type, everything works fine. We have also tested the simple webdynpro application on Local WAS. Then the activities