Android Studio 3.3 Java 8 debugger “this” is not available in lambdas and cannot stop on “if”












2















I have changed my Android Java version to 8 wanting to simplify some code writing. An issue I am having, and I cannot figure out, is that I am getting a 'this' is not available in the debugger for the class properties when they are inside a lambda expression. As mentioned in the title I have updated to the latest Android Studio 3.3.



I have been searching around for some time now trying to figure out what I am doing wrong but with no luck.



Another issue that I am having is that when in lambdas (and anonymous in general) the debugger cannot stop on if statements (visually the breakpoint red circle never gets a tick mark), something I am pretty sure I could do before. Are there changes (or settings) in Android Studio 3.3 that caused this? What am I missing?



Any ideas/solution would be much appreciated.



EDIT:



There is another question concerning the if breakpoints issue specifically. The OP there gives a very generic answer that I am not satisfied with and it doesn't answer the why.



What I noticed is that the if statements that have complicated logic in them do not get active breakpoints. So an if (object.getSomething() == something) will not work, but if you assign that to a value and then use the value in the comparison it works just fine... mystery deepens.










share|improve this question















migrated from superuser.com Jan 25 at 5:51


This question came from our site for computer enthusiasts and power users.























    2















    I have changed my Android Java version to 8 wanting to simplify some code writing. An issue I am having, and I cannot figure out, is that I am getting a 'this' is not available in the debugger for the class properties when they are inside a lambda expression. As mentioned in the title I have updated to the latest Android Studio 3.3.



    I have been searching around for some time now trying to figure out what I am doing wrong but with no luck.



    Another issue that I am having is that when in lambdas (and anonymous in general) the debugger cannot stop on if statements (visually the breakpoint red circle never gets a tick mark), something I am pretty sure I could do before. Are there changes (or settings) in Android Studio 3.3 that caused this? What am I missing?



    Any ideas/solution would be much appreciated.



    EDIT:



    There is another question concerning the if breakpoints issue specifically. The OP there gives a very generic answer that I am not satisfied with and it doesn't answer the why.



    What I noticed is that the if statements that have complicated logic in them do not get active breakpoints. So an if (object.getSomething() == something) will not work, but if you assign that to a value and then use the value in the comparison it works just fine... mystery deepens.










    share|improve this question















    migrated from superuser.com Jan 25 at 5:51


    This question came from our site for computer enthusiasts and power users.





















      2












      2








      2








      I have changed my Android Java version to 8 wanting to simplify some code writing. An issue I am having, and I cannot figure out, is that I am getting a 'this' is not available in the debugger for the class properties when they are inside a lambda expression. As mentioned in the title I have updated to the latest Android Studio 3.3.



      I have been searching around for some time now trying to figure out what I am doing wrong but with no luck.



      Another issue that I am having is that when in lambdas (and anonymous in general) the debugger cannot stop on if statements (visually the breakpoint red circle never gets a tick mark), something I am pretty sure I could do before. Are there changes (or settings) in Android Studio 3.3 that caused this? What am I missing?



      Any ideas/solution would be much appreciated.



      EDIT:



      There is another question concerning the if breakpoints issue specifically. The OP there gives a very generic answer that I am not satisfied with and it doesn't answer the why.



      What I noticed is that the if statements that have complicated logic in them do not get active breakpoints. So an if (object.getSomething() == something) will not work, but if you assign that to a value and then use the value in the comparison it works just fine... mystery deepens.










      share|improve this question
















      I have changed my Android Java version to 8 wanting to simplify some code writing. An issue I am having, and I cannot figure out, is that I am getting a 'this' is not available in the debugger for the class properties when they are inside a lambda expression. As mentioned in the title I have updated to the latest Android Studio 3.3.



      I have been searching around for some time now trying to figure out what I am doing wrong but with no luck.



      Another issue that I am having is that when in lambdas (and anonymous in general) the debugger cannot stop on if statements (visually the breakpoint red circle never gets a tick mark), something I am pretty sure I could do before. Are there changes (or settings) in Android Studio 3.3 that caused this? What am I missing?



      Any ideas/solution would be much appreciated.



      EDIT:



      There is another question concerning the if breakpoints issue specifically. The OP there gives a very generic answer that I am not satisfied with and it doesn't answer the why.



      What I noticed is that the if statements that have complicated logic in them do not get active breakpoints. So an if (object.getSomething() == something) will not work, but if you assign that to a value and then use the value in the comparison it works just fine... mystery deepens.







      java android android-studio debugging






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 25 at 15:15







      MadDim

















      asked Jan 24 at 3:19









      MadDimMadDim

      126213




      126213




      migrated from superuser.com Jan 25 at 5:51


      This question came from our site for computer enthusiasts and power users.









      migrated from superuser.com Jan 25 at 5:51


      This question came from our site for computer enthusiasts and power users.


























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54359636%2fandroid-studio-3-3-java-8-debugger-this-is-not-available-in-lambdas-and-cannot%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54359636%2fandroid-studio-3-3-java-8-debugger-this-is-not-available-in-lambdas-and-cannot%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕