Debugger shows wrong line numbers in local file

I'm using the debugger in Safari 5 for a web app that is entirely made up of local files (it's actually a dashboard widget). For most files it's fine, but there are a few where there appears to be a skew between the actual line number and the line number displayed by Safari. As a result, some errors are displayed with the wrong line number (e.g. "Syntax error on line 5" when the actual line is 2). More troublingly, if I place a breakpoint in a file, it acts as if it is on the wrong line so when I step through the code the current line is actually different from the one displayed by the debugger.
The weird thing is that the line numbers displayed in the script panel are all correct, so line 47 really says "47" in the left margin, but Safari still thinks that it is line 44. In general, the skew seems to be constant and equal to -3, so the real current line when debugging is 3 lines higher than the one displayed as the current line in the debugger.

This looks to me like a Safari bug. I did some experimentation, and it appears to be caused by the use of the newer getter syntax in an object prototype. When I do this the debugger seems to set breakpoints at the wrong lines as described in my previous post:
function foo() {
foo.prototype = {
  get bar() {
  do_it: function() {
    var baz = 1;
var obj = new foo();
obj.do_it();
If remove the definition of the bar getter or change it to use the older __defineGetter__ syntax then the problem goes away.

Similar Messages

  • I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoint​s along with text box. Can anybody help me in this? Thanks.

    I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoints along with text box. Can anybody help me in this? Thanks.

    Thanks for you reply.
    But actually I don't want to show the \ (backslashes) to the user in my text box. 
    Ok let me elaborate this problem little more. 
    I want to show my text box as it is in normal editors e.g. In Matlab editor. There is a text box and on left side the gray bar shows the line numbers corresponding to the text. Further more i want that the user should be able to click on any line number to mark specific line as breakpoint (red circle or any graphical indication for mark). 
    Regards,
    Waqas Ahmad

  • After casting double to float debugger shows wrong value

    Hi,
    My colleaque found an interesting behaviour with Java debugger. I have made some tests and here are the results:
    Test code:
    double dNum = 43.680659;
    float fNum = (float) dNum;
    System.out.println("double number = " + dNum);
    System.out.println("float number = " + fNum);This is tested in Eclipse IDE 3.4.2 with following Java JRE versions:
    - 1.4.2_19
    - 1.5.0_14
    - 1.6.0_10
    And following JDK:
    - jdk1.5.0_16
    Eclipse IDE will show following values for variables in all platforms:
    dNum = 43.680659
    fNum = 43.74316Console will print:
    double number = 43.680659
    float number = 43.68066Testing also with command line debugger jdb. Java JRE version:
    - 1.4.2_19
    And following JDK:
    - jdk1.5.0_16
    Results are the same as in Eclipse IDE. Is there a bug in debugger environment?

    I managed to find bug report of this issue:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6807341
    Information:
    Bug ID : 6807341
    Synopsis : JDWP: float value reported incorrectly
    Category : java:debugger
    State : 3-Accepted, bug
    Priority : 4-Low
    Submit Date: 19-FEB-2009

  • Fullscreen Video playback shows wrong line at top and bottom

    I have a very annoying problem for years now, it happens with various Windows-OS (XP, Vista, Win 7) and no iTunes/Quicktime update changed anything ever:
    If I watch my iTunes Video clips (all bought in the iTunes store) in fullscreen the first (header) line of the video playback is displayed at the bottom and vice versa. You need to watch a video with different colors in the upper and lower part, then the error is quite noticeable.
    I use ATI Graphics cards.
    Anyone knows a solution?

    Thanks for your quick answer, however I did try that and the problem
    remained. Also, DVD's that I buy in the store play fullscreen without having
    to change any settings to the player nor the TV so way should it now? (just
    wondering)
    The only way to get it to play full screen is set the TV to "cinema 1"
    instead of "16:9". But then it looks like the image is blown up.
    I'm not sure if it's relevant but the TV is a widescreen LCD HD flatpanel,
    DVD player is a standard (cheap) one.

  • Debugger stops in wrong lines in Sun Studio 8

    Hallo,
    I'm trying to use Java Studio Enterprise 8 in Suse 9 and couldn't understand why debugger is showing wrong lines in standart editor. Project rebuilding doesn't help.
    Raitis

    There was a bug filed for this issue (http://www.netbeans.org/issues/show_bug.cgi?id=46621) but that was fixed in nb4 and hence should be fixed in jse8 (based on nb41); unless the fix, for some reason, does not work on suse.
    - Does 'Clean and Build' project help?
    - Does restarting the ide help? Or do you see the issue even after the ide is stopped and restarted?

  • How do I display line numbers in a adobe reader pdf file

    Hello,
    I have a PDF file containing c++ code opened in adobe reader. How do I display line numbers in the file?
    Thanks

    You mean, by adding non existing numbers in front of each line, and using only the free Reader? No way.

  • FBL5N t code and BSEG table is showing wrong contract number

    Hi,
    The proces flow is contract number>sales order>DMR-->Invoice
    Now when I am checking the VBFA table it's showing correct contract number against invoices but FBL5N t code and BSEG table are showing wrong contract numbers.
    Why FBL5N and BSEG table is showing wrong contract number?
    Currently we are using one enhancement and user exit is used to incorporate one customized field as identifier for bill type.
    1. During the billing document release to accounting VFX3, The user exit triggering and it is update the customized fields and Net settlement indicator.
    2. Using the Invoice number, get the fields VGBEL(Document number of the reference document) and VGPOS (Item number of the reference item) from VBRP and read table VBAP with VBELN and POSNR, to get DMR number (Sales Document) that created for the Invoice.
    3. Use fields VGBEL and VGPOS on table VBAP to get the sale order number.
    4. By using the Sales order number, get the Distribution channel to update Net indicator field
    In accounting table BSEG-UZAWE = JF must be updated on the customer line.
    5. Retrieve the sale order number and item level to get customized field from table VBAP
    Any pointers.
    Thanks
    Ashu

    Hi Reazuddin,
    Thanks for your reply,
    I am concercerned about BSEG table and using user exit EXIT_SAPLV60B_008 to post the document in FI.
    Now in we have enhanced this user exit  for contracts and included in this way.
      SELECT SINGLE ZZ_CONTRACT FROM VBAK INTO (LC_CONTRACT) WHERE VBELN EQ cvbrp-vgbel.
    Endloop.
    *Moving the values to final accounting table
    loop at xaccit.
    xaccit-vertn = lc_contract.
    xaccit-VBEL2 = xaccit-AUBEL.
    xaccit-xref3 = lc_vbel2.
    MODIFY xaccit .
    ENDLOOP.
    Clear: lc_contract,lc_vgbel,lc_vgpos,lc_vbel2.
    But I am getting correct data when checked other clients( development and quality), this problem I am getting in production.
    Do I need to ask the ABAP'er to debug this enhancement in production?
    Thanks
    Ashutosh

  • Find line number in text file

    Hi all,
    I need to find the line numbers on a file where a particular string matches.
    for example:
    A lazy cat
    A strong cat and it is black
    Black is not good
    So I will match for the word black and it will give the numbers say line 2 and 3 it found the match.
    I am using the code:
    try{
        // Open the file that is the first
        // command line parameter
          FileInputStream fstream = new FileInputStream("c:\\test.log");
        // Get the object of DataInputStream
          DataInputStream in = new DataInputStream(fstream);
          BufferedReader br = new BufferedReader(new InputStreamReader(in));
          String strLine;
         String[] arr= null;
        //Read File Line By Line
       String regex = "black";
       while ((strLine = br.readLine()) != null)   {
        // Split the sentence into strings based on space
           arr = strLine.split("\\s");
       if (arr[0].equalsIgnoreCase("black"))
          System.out.print("match found");
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(strLine);Thanks in advance.

    camellia wrote:
    I need to find the line numbers on a file where a particular string matches. Then declare a variable for line count. Find where you read in a line. Finally increment this variable each time a line is read.
    It isn't rocket science.
    Mel

  • [svn:fx-4.0.0] 13535: Part 1 of fixing line endings in AS and MXML files so that line numbers are correct while debugging .

    Revision: 13535
    Revision: 13535
    Author:   [email protected]
    Date:     2010-01-15 14:45:38 -0800 (Fri, 15 Jan 2010)
    Log Message:
    Part 1 of fixing line endings in AS and MXML files so that line numbers are correct while debugging.
    We've got a widespread problem with line-endings (\r\n vs \n vs \r) because not all our files have svn:eol-style set to "native". (With this setting, the line endings are adjusted for the platform that you check out code onto. Without it, you can end up with all-Mac line endings on a Windows machine, WindowsMacUnix line endings on a Mac, etc. The goal is all-Win on Win, all-Mac on Mac, etc.)
    For schedule reasons, we've decided to minimize risk by fixing only AS and MXML files in frameworks/projects that contribute to our SWCs, because here line-ending problems can throw off line numbers and the debugger doesn't step through the right lines of code.
    You can't set svn:eol-style to "native" unless the line endings are already correct for your platform. Since I'm on Windows, I wrote a script to find a fix the files that had any \n or \n line endings. The files now have \r\n.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24966
    Reviewer: Pete
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24966
    Modified Paths:
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.a s
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/ISelectableList.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/core/LayoutElementUIComponen tUtils.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/geom/CompoundTransform.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/geom/TransformOffsets.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/skins/halo/WindowBackground. as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/utils/MatrixUtil.as
        flex/sdk/branches/4.0.0/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatche r.as
        flex/sdk/branches/4.0.0/frameworks/projects/osmf/src/org/osmf/media/MediaFactory.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/Operation.as
        flex/sdk/branches/4.0.0/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPMultiService.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/HSlider.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/PopUpAnchor.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/Scroller.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/mediaClasses/Volum eBar.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Dro pDownController.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Dro pDownListBase.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Scr ollerLayout.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/components/supportClasses/Sli derBase.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/AnimateTransform.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/supportClasses/Animat eTransformInstance.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/effects/supportClasses/MoveIn stance.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/events/SkinPartEvent.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/skins/spark/HighlightBitmapCa ptureSkin.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/skins/spark/ScrollerSkin.mxml
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInher itingTextStyles.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/styles/metadata/AdvancedNonIn heritingTextStyles.as
        flex/sdk/branches/4.0.0/frameworks/projects/spark/src/spark/utils/LabelUtil.as
        flex/sdk/branches/4.0.0/frameworks/projects/wireframe/src/spark/skins/wireframe/NumericSt epperTextInputSkin.mxml

    Hi there,
    I follow the help from this post
    How to handle line break embeded inside CSV column
    Not a perfect way, but it is accepted in my case.
    Cheers,

  • Missing lines when exporting to local file

    I've recently created a query in SQ01 which pulls out sales order information and uses a data reading program to display the texts.
    The query works absolutely fine and shows all the data required in SAP.
    The problem comes however when I export it to Excel using the ALV functionality of Export to Local file - spreadsheet. some of the lines in the middle of the report are missing in the saved excel file despite them being present in SQ01.
    However if I use the method of Export to local file - in the clipboard... and paste the data into an excel sheet, all the lines are present.
    What could be the cause of this issue? I could use the method of copying to the clipboard but a lot of people use this report and they aren't all comfortable with the copy paste method (because you then have to perform text to columns etc.) so it would be better if I could work out why it's not working in the original way and fix it.

    Hi Benjamin,
    let me first put in a question.
    Why don't you use the direct to excel export?
    If there's an issue with the inplace excel, there's an easy work-around for that.
    From the alv-grid chose printing preview, when you use the excel button from there, you'll get the popup asking you for format, table type etc. and then rewards you with a (usually) complete and readable excel.
    Note, that the download to local file, with spread-sheet option, creates an ascii csv file, with an xls extension. It's not quite an excel file.
    It might be exccel and not the export.
    Give it a try.
    BR - Jörg

  • Wrong metadata shown for some local files

     As shown in the first attachment, I have some mp3s for a japanese artist, and one of the tracks spotify wrongly associates it with a completely different track. the title of the track isn't even the same (it is "Please Please", all other details are the same as the surrounding tracks). This I could put up with no problem as it still plays the mp3, the annoying thing for me is that it scrobbles the wrong track to last.fm when i listen to it. The 2nd attachment shows another smaller issue, as they actually match to the correct tracks (even though the spotify linked ones are singles rather than the album) but also provides the same scrobbiling issue since the artist and album names are in english rather than japanese like I have in the id3 tags. An advanced option to prefer local file metadata over spotify metadata would be king here!

    Some files when imported into the timeline were shown shorter, because the frame rate that was deduced from the file was way too high. The fix targets this scenario.In fact, there could be cases where the frame rate displayed could be as absurd as 500 fps from a mobile phone camera which is not capable of capturing at that high rate.
    So if someone has reported such issues, they could benefit from this. The fix is for both Windows and MAC

  • How can I add a line to my CSS file to have all TextArea fields show PRE

    Hi,
    I would like all my TextAreas to show the text as it was inserted into the database... with the new lines, tabs, etc...
    I would like to add a line to my CSS file to do this if possible.
    Thanks, Bill :>)

    Thanks for all the input!
    Fab. You have been talking about a report the whole time... I have been talking about one Database ITEM that is "Displayed as Text".
    In a report the replace() always works in all browsers I believe... and I had no problem.
    BUT, in a text ITEM I wasn't able to get anything to work..
    So, I created a report region and retieved this one column (item) and selected a borderless region and it is fine...
    select     replace(LAST_ACTION,chr(10),'<BR>') "LAST_ACTION"
    from     "HT_ISSUES" "HT_ISSUES"
    where issue_id = :P7_ISSUE_ID
    I still would like to know how to Display as Text - as it is in the DB.
    When have a Dispay as Text Item and I view Source when running the page.. it is correct in the source delivered to the browser but displays all one line.
    (I save a SQL statement to the field)
    [tr>[td  colspan="6" rowspan="6" align="left">[span class="t3NoLabel">Last Action Item[/span> [br>Maintenance Issue - SELECT *
    FROM (SELECT ROWNUM row_num, empno, ename, job, mgr,
    hiredate, sal, comm, deptno
    FROM emp)
    WHERE row_num BETWEEN NVL (:p7_row_from, 1)
    AND NVL (:p7_row_to, 1000000)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • GetAppletContext().showDocument() won't show local files for some people

    Hi,
    I have a reporting function that creates a pdf and stores on the users computer in the local temp drive and then displays the created pdf in a new browser window. Everything works fine except for some users it won't show local files. This is a signed applet and everyone has the same policy file. I can't work out why it works for some users and not for others, there doesn't seem to be a pattern in o/s, configurations etc. When i run the code locally on tomcat it works for me but when i upload to server it doesn't. There is no error message either. The pdf is definitely being created as well as you can check it in the temp directory. Code is below:
    void btnReport_actionPerformed(ActionEvent e) {
    try {
    String args[] = {"-pdf"};
    File f = File.createTempFile("SCReport", ".pdf");
    FileOutputStream fos = new FileOutputStream(f);
    JCPrinter printer = SCPrintManager.getPrinter(args, fos);
    if (printer == null) {
    System.out.println("Printer is equal to null");
    // What has been selected?
    SCReport report = new SCReport(printer);
    Vector vectSubConsultant = createVectorFromScreenInfo();
    if (vectSubConsultant == null)
    return;
    report.addSectionForSC(vectSubConsultant, true);
    SCPrintManager.printDocument(report.getDocument(), printer);
    printer.getOutputStream().close();
    URL reportURL = f.toURL();
    URLConnection con = reportURL.openConnection();
    ReDirector().getAppletContext().showDocument(reportURL,"report");
    catch (Exception ex) {
    System.out.println("Error producing report");
    ex.printStackTrace();
    }

    Did you have any luck? As I am trying to do the same thing...

  • ALV download to local file, splits line in two

    Dear Abapers,
    I have a quite wide ALV report, when downloading to local file, I get the "long" line splitted in 2 (in case of spreadsheet format) and in 3 in case of unconverted format.
    Is there a turn arround in order to have only one line?
    It's not an excel limitation, once there are enough columns to paste the "lower" part of the line on the right of the "upper" part.
    Thanks in advance.
    FLP

    Hi,
    I download the report, pressing the "Local File... (CtrlShiftF9) icon on the ALV, after I choose "Uncoverted" or "Spreadsheet" radio button. If by "Excel in place" you mean press the "Microsoft Excel" icon, for some stransge reason, on my pc and some other users this doesn works, nothing happens or a blank spreadsheet is opened, if you mean something else, plese revert, once I didn't understand it correctly.
    Thanks in advanve
    FLP

  • Local File - Downloads Data into 1 line in Excel 2007

    Hello
    When I have the option to download a spreadsheet into excel, the data is downloaded correctly.  When I have information in a table format and I have to use the local file to download into excel all of my data is exported into 1 line.
    Can anyone help?
    Thanks!
    Joe

    Hello
    Request you to please search for notes further in the Service Place. There is a note which I have found might help you. It is
    1010935.
    Hope it helps you.
    Rgds

Maybe you are looking for

  • Report generation for Substances

    Hi Everybody,                   I am trying to generate the word report from the substance information. For that i setup WWI and now i am able to create report templates and also able to generate the word reports in the Specification workbench. But t

  • SSL handshake error when calling Web Service

    Hi Grant, I am using your example here: http://groundside.com/blog/GrantRonald.php?title=calling_a_web_service_from_oracle_forms__2&more=1&c=1&tb=1&pb=1 to call a web service from forms 10g on a machine with no proxies set up. I get to the point wher

  • DualCoreCenter Fails to work

    Sorry for such a Noob question but When I click the DualCoreCenter icon I get a brief hourglass mouse cursor then nothing...it seems to not execute.  I have the Dot Net framework installed..... Any ideas? Thanks

  • No service on iPhone 3gs since update to iOS 6.01

    Hi, I updated mij iPhone 3gs to iOS 6.01. Since then most of the time I get "no service" or "Searching ...." I can not contact the cellular network form my provider. The Sim is ok. It works fine on an other phone. Does anyone know what to do? I can u

  • PSE 12 - FILE ALREADY EXISTS

    PROBLEM: "FILE ALREADY EXISTS" - PSE 12 Organizer & Editor – (creates separate files for the grouped scanned photo process, in a single pass) using Editor IMAGES/DIVIDE SCANNED PHOTOS this results in system replacing existing files (ie "scan-123 copy