The current instruction pointer. When I put the debugger in a specific place, it starts debugging its previous step, and then goes to its current location. I see a pointer to the current instruction with a debugger icon elsewhere when the debugger starts.
Please help me, I tried to get rid of him in the last two days.
This is the scenario:
I put off the debugger in the viewattachment that comes after openattachment . But when I click openattachment , it starts to debug, and then when I click viewattachment , debugging starts.
Why is this going to open? This is overhead for me. can anyone help me with this?
Please let me know if my question is not clear.
The code matters ..........
else if (getParameters().get("type") != null && getParameters().get("type")[0].equals("**viewattachment**")){ String elementUid = getParameters().get("elementUid")[0]; String target = "failure"; JSONObject obj = new JSONObject(); if (!isUserLoggedIn()){ target="session"; obj.put("result", target); } else{ if (!isValidUid(cardUid) || !isValidUid(elementUid)){ //return "fail"; obj.put("result", "fail"); } else { setMessages(msgService.WSIGetAttachments(elementUid)); if (!isAccountManager()) { Message msg = getMessages().get(0); HttpServletResponse response = ServletActionContext.getResponse(); try{ response.getOutputStream().print(obj.toString()); } catch(IOException e){ log.error(e); } response.setContentType(msg.getAttachmentcontentType()); response.setHeader("filename", msg.getAttachmentName()); response.getWriter().print(obj); response.getWriter().flush(); response.getWriter().close(); } return null; } } } else if (getParameters().get("type") != null && getParameters().get("type")[0].equals("**openattachment**")){ String elementUid = getParameters().get("elementUid")[0]; if (elementUid != null) {//Conversion detail request JSONArray array = new JSONArray(); JSONObject obj = new JSONObject(); if (!isValidUid(elementUid)){ obj.put("result", "fail"); obj.put("message", "Not a valid element"); } else{ setMessages(msgService.WSIGetAttachments(elementUid)); obj.put("result","success"); if (getMessages() != null && getMessages().size() > 0){ for (Message m : getMessages()){ JSONObject obj1 = new JSONObject(); obj1.put("attachmentname", m.getAttachmentName()); obj1.put("elementUid", m.getElementUID()); array.add(obj1); } } obj.put("messages", array); HttpServletResponse httpResponse = ServletActionContext.getResponse(); try{ httpResponse.getOutputStream().print(obj.toString()); } catch(IOException e){ log.error(e); } return null; } } }
source share